Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Image from next/image for when a specific node inside uidl respects the requirements. #574

Closed
JayaKrishnaNamburu opened this issue May 17, 2021 · 0 comments · Fixed by #575
Labels
enhancement New feature or request react generators Issue related to the react generator

Comments

@JayaKrishnaNamburu
Copy link
Member

NextJS recently released NextJS 10 and a new Image-component to handle images. But it has some specific requirements. So, any node that matches the specific requirements. Please change it’s tag name to Image Instead of img.

https://nextjs.org/docs/api-reference/next/image

This can be achieved by passing a new plugin for teleport-project-generator-next. Since we don’t need to add framework specific business logics inside react-base component. A inspiration for this plugin could be InlineStyles Which we can check here https://github.com/teleporthq/teleport-code-generators/blob/development/packages/teleport-plugin-jsx-inline-styles/src/index.ts

But before this switch make sure the next templates are upgraded to Next-10. At the moment we are using Next-9.3 for generating projects.

@JayaKrishnaNamburu JayaKrishnaNamburu added the enhancement New feature or request label May 17, 2021
@JayaKrishnaNamburu JayaKrishnaNamburu changed the title Use **Image** from next/image for when a specific node inside uidl respects the requirements. Use *Image* from next/image for when a specific node inside uidl respects the requirements. May 17, 2021
@JayaKrishnaNamburu JayaKrishnaNamburu added the react generators Issue related to the react generator label May 17, 2021
@JayaKrishnaNamburu JayaKrishnaNamburu changed the title Use *Image* from next/image for when a specific node inside uidl respects the requirements. Use Image from next/image for when a specific node inside uidl respects the requirements. May 17, 2021
@Utwo Utwo closed this as completed in #575 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react generators Issue related to the react generator
Projects
None yet
1 participant