Design comparison
Solution retrospective
I don't get it why my solution is not showing in comaprison section
Community feedback
- @codarosePosted over 1 year ago
Hi Rane!
It looks like you implemented your app with react. It is possible that the page wasn't actually 'served' yet on github pages when you submitted your solution, therefore the screenshot that was generated on Frontend Mentor would be blank. You could try "regenerating the screenshot," and see if that helps. It looks like your site is live now so it should be able to generate the screenshot.
Your app is great! I like how the card details render immediately as typing, I didn't implement it that way but I kind of wish I had now.
I noticed that your "Date" input for the expiration date is off a little bit - when the input field says "July", the card reads "06", there seems to be an off by one error for each month. It is possible this is due to the way that the date is indexed in the "Date" constructor method, i.e. January is indexed at "zero".
You might be able to fix that error by updating your state variable like so:
const [date, setDate] = useState(new Date("01/23"));
And then calling it without the Date constructor within your 'format' call: {format(date, "MM/yy")}
Nice solution!!
Marked as helpful1
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