There is an error that I haven't been able to resolve, I got frustrated and just let it be. I know that it is happening because setArray() is running before localStorage.setItem(..) but I couldn't figure out what to do. So, to get the app working, just click on submit twice and then click on the Congrats page button. This only happens when there is either just 1 image or 0 images in local storage. The ocnsequent times it's working just fine. Clicking on the Congrats page button will navigate to "/something" which displays the required results
awesamarth / vitrendz-task-2 Goto Github PK
View Code? Open in Web Editor NEWHome Page: vitrendz-task-2.vercel.app