Design comparison
Solution retrospective
I wouldn't say proud, but Yes I created and implemented my own custom hook for the first time, without any external help (chatGpt, tutorials, e.t.c).
What specific areas of your project would you like help with?I would appreciate an efficient method for removing the Leaflet ZoomControl
on mobile screens using ReactJS.
Feedback is always welcome.
Community feedback
- @TedJenklerPosted 3 months ago
Hi @Martinsgundi,
Nice project! I like the extra features you've added. To remove the Leaflet ZoomControl on mobile screens using ReactJS, you can use the useEffect hook to detect the screen size and conditionally remove the control (another option is to create a custom hook). Alternatively, you might consider removing the buttons entirely, as they're not needed when users can zoom in with the mouse (if configured correctly).
I also noticed that your site isn't fully responsive. Depending on the address, the layout can break. Consider shortening the IP or using "..." if it overflows or causes issues on the page.
Overall, great work with just a few areas to refine, Hope this feedback was helpful
Best regards, Teodor
Marked as helpful0@MartinsgundiPosted 2 months agoHey Teodor,
Thank you so much for your feedback—I really appreciate it.
I recently discovered from the LeafletJs doc that users can zoomOut by holding the
Shift
key and left-clicking twice. It was the lack of this info that made me add thezoomControl
button in the first place. So, definitely, the best and most efficient choice was to remove thezoomControl
button.To improve the user experience, I added an info (ℹ️) notification to inform desktop users about how to zoomOut.
Regarding responsiveness, I didn’t make any significant changes—just adjusted some padding and widths here and there. However, if you notice any differences on your end, please let me know.
Thanks again!
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