Design comparison
Solution retrospective
CSS looks fine this time
What challenges did you encounter, and how did you overcome them?In the Figma files, it looks like you can begin a new search if you click on any synonym. This is given as an example: " electronic guitar". But the API doesn't return any results for multiple words. Which meant a day on trying to figure out what I was doing wrong
What specific areas of your project would you like help with?Easy ways to set up light/theme toggle when using React + Tailwind because I don't think my solution is the best (adding lightMode/darkMode classes to all relevant elements)
Community feedback
- @LucianoDLimaPosted 8 months ago
Hey, nice job on completing this challenge!
-
Easy way to set up dark theme: https://www.youtube.com/watch?v=vIBKSmWAdIA
-
If you click a synonym/antonym, it should take user to that word page, yes. To do that you need to change the words to a
<button>
tag instead of<span>
. Now you can add an event to this buttons where it will take whatever text is inside the button, then make a fetch request with that word (like you did when a user clicks the magnifying glass in the search input)
0@XeotheosisPosted 8 months ago@LucianoDLima Thanks for the link, actual useful information.
I have several versions of the project - one where the {synonym} is wrapped in a button which triggers another fetch request. The problem is not all synonyms suggested return a definition, like "electronic guitar". I noticed the same behaviour in your very well made project but I wasn't sure if that's actually to be expected or intended. Guess I'll add it back
1@LucianoDLimaPosted 8 months ago@Xeotheosis This api indeed has missing words, (I wish we had better one but this is free so I can't complain at all) which causes it to not return a definition like in your example, this is expected behaviour. You could return an error if the word has no definition once you click it
Edit: Never mind, I see you already did that
1 -
Please log in to post a comment
Log in with GitHubJoin 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