URL Shortening Page Using HTML, TailwindCSS and JS

Solution retrospective
I really thought this challenge would be straightforward but it has really been a challenge. I'm stuck on how to set the whole output div to localStorage and I've researched but to no avail. The output div also keeps duplicating. If I shorten two different links, the first one outputs really ok but if I try to shorten another link, it shows two of the previously shortened links and my current link summing it up to 3 divs instead of just 2. I think my approach to displaying the output might be the issue. Any help would be appreciated. Thank you.
#Edit: I discovered what made my divs duplicate and I displayed the links by using the createElement function rather than the map method I used before. I'm still stuck on setting it o localStorage tho...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Alabi Olalekan Emmanuel'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