thomasreynolds4881 / ourdailydrink

A React app that gives you new drink recipes daily.
https://ourdailydrink.com
MIT License
1 stars 1 forks source link

Added timer that resets every 24 hours. #10

Closed SalmanShahid888 closed 2 years ago

SalmanShahid888 commented 2 years ago

I have added a timer component below your pulled cocktails.

Let me know how it works and if it has any bugs because my local time is different then yours I couldn't test it properly in my environment.

Added dayjs dependency for time manipulation

thomasreynolds4881 commented 2 years ago

Thanks, I went ahead and merged it. I moved it to index.js so that it's not a direct part of the card component too. It looks like the logic of the timer isn't working though, since it will always display the same estimated time when running initially. I think the reason might be with how "tomorrow" variable is defined but I could be wrong. Feel free to troubleshoot, otherwise I can do it myself later. Thanks!

SalmanShahid888 commented 2 years ago

I think the reason might be with how "tomorrow" variable is defined but I could be wrong. Feel free to troubleshoot, otherwise I can do it myself later.

Regards,

Salman.