Responsive Card Component with React and TailwindCSS

Solution retrospective
I added the correct font-family
and font-weight
, but it doesn't seem to look like the one from the Figma file, do you know what I'm doing wrong?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @elaineleung
Hi James, it looks like you're using Next.js here, and so the link for the font family should go in the
Head
component in the Document (_document.js
) file. I tried looking for it in your repo but couldn't see it; I did see you adding the web font link in your global styles, but that might not work here. I remember @KostasKv built this challenge also using Next.js and Tailwind; you can have a look at that here: https://www.frontendmentor.io/solutions/interactive-rating-tailwind-css-nextjs-first-time-trying-it-lFKFAcH4lhAbout your solution for this challenge, it looks fine to me, and the only suggestion I have is to see whether you can add in some logic for handling what happens when no rating gets selected but the user hits submit anyway.
By the way, it looks like you are using your repo for multiple FEM projects in Next.js. That might be OK since I also use one repo for all my FEM projects, except it's mostly in plain JS and no frameworks or libraries. The only thing I'm not sure about for you is when each project needs a different font family, and I wonder if that means you'd have to paste a bunch of web font links in your Document file. I looked at your Product Preview challenge, and it doesn't look like the Fraunces and Montserrat fonts there got used either. Anyway, I hope you get this sorted, so good luck!
Marked as helpful
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