NASA-IMPACT / veda-ui

Frontend for the Dashboard Evolution project
Other
25 stars 5 forks source link

Cookie consent render logic #1240

Closed hanbyul-here closed 3 weeks ago

hanbyul-here commented 3 weeks ago

This pr fixes infinite rerendering issue (it was from the parsing error of cookie value - so I added a unit test to make sure this works. - I used the solution from this post, feel free to edit if you see any improvement https://stackoverflow.com/questions/5142337/read-a-javascript-cookie-by-name) - also feel free to edit the test, I mainly put it for my dev purpose.

I removed currenwindowurl logic, replaced it with pathname passed from the layout root. I started making this change and then realized that this is not the cause of infinite rendering problem, but I think it is probably safer to depend on the pathname change than location.href since href can include so many things like query parameters?

netlify[bot] commented 3 weeks ago

Deploy Preview for veda-ui ready!

Name Link
Latest commit 7061657cdc50a04312f480389a5caeda6c9a97fb
Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/672915c8b7a079000849bc0c
Deploy Preview https://deploy-preview-1240--veda-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.