E-commerce product page (Next.js + Tailwind.css)

Solution retrospective
- I'm proud that the challenge didn't seem complicated to me.
I was not sure shall I try to make a component reusable or I need to make two separate ones.
-
Navigation component. I made a separate one for a mobile navigation because it's a modal window.
-
Photo gallery. I also made two separate components, a photo gallery is also a modal window.
-
Is it ok if I make a separate component for a mobile navigation (meaning I'm not reusing desktop navigation component)? A mobile nav is a modal window.
-
What's the best way to make components for the PhotoGallery and PhotoGalleryModal to make PhotoGallery reusable and not to repeat the code?
-
Where to have useState for cart modal? In the header? Then the whole component must be client. The same with the PhotoGallery modal which makes the Main.tsx a client component as well, is it ok?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on 22-22's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord