Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

Time Tracking Dashboard with Next.js

next, react, tailwind-css
Daniel Aadland•100
@GreenCitrus6
A solution to the Time tracking dashboard challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I struggled a lot with handling the SVG images in this challenge, both getting them to overlap properly with other elements and also trying to keep them from deforming in a way that could be reused in the component I made for the time tracking cards. I did end up solving the overlap problem by giving the SVG z-index: -1 and the background element z-index: -10.

I also managed to get both the mobile and desktop views to look passable, but I had trouble making everything in between look alright. The way the breakpoints are setup are still pretty rough, so I might go back and adjust those later.

Is <Image /> the best way to handle SVGs in Next.js at the moment? When I was looking for solutions to my problems I read that some people gave up on using it, but I also saw that it was overhauled recently, so maybe the problems it had initially have been addressed.

What is best practice in regards to making varying styles for a single component, such as the cards for the different time categories in this project (Work, Play, etc.)? For this project I created an object to store the styles (classes for Tailwind to handle) and accessed them based on properties passed down to the component, but I'm not sure if this approach is ideal.

Thanks for checking out my solution!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Daniel Aadland'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License