Design comparison
Solution retrospective
Hey everybody!
Thank you for reviewing my code and giving feedback.
I've been cracking my head on the hook that i made in order to make it return daily/weekly/monthly values without explicitly stating with a if statements which timeframe i wanted, but after a few hours i chose the duplication of code
way.
does anyone have an idea how i turn this: CardTimeFrames={{ current: c.timeframes.daily.current, previous: c.timeframes.daily.previous, }}
into this?
CardTimeFrames={{ current: c.timeframes.[// daily/weekly/monthly //].current, previous: c.timeframes.[// daily/weekly/monthly //].previous, }}
Thank you in advance!
Community feedback
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