CodeForPhilly / clean-and-green-philly

Dashboard to target Philly vacant properties for anti-gun violence interventions
https://www.cleanandgreenphilly.org/
MIT License
32 stars 60 forks source link

Bug: Cookie banner reappears after user accepts cookies #701

Closed CodeWritingCow closed 2 months ago

CodeWritingCow commented 3 months ago

Describe the bug After a user accepts cookies on the Clean & Green website, the cookie consent banner still appears whenever the user opens the site in a new browser window or tab.

To Reproduce

  1. Go to https://www.cleanandgreenphilly.org.
  2. Click on 'Accept' button in the cookie consent banner at the bottom of the screen.
  3. Open a new browser window or tab, then go to https://www.cleanandgreenphilly.org.
  4. Cookie banner will appear at the bottom of the screen in the new tab/window.

Expected behavior If a user accepts having cookies on the website, and opens the site in a new browser window or tab, the cookie consent banner should not reappear.

Screenshots Here is a screen recording of the bug:

https://github.com/CodeForPhilly/clean-and-green-philly/assets/7751862/3bf0fd88-e7c0-4da3-9bb4-a45fe488afa7

Desktop

Additional context This bug is related to Pull Request #635.

JT0Y commented 3 months ago

Greetings and salutations- Could I take a whack at this and get this assigned to me? I was looking through the code and it looks like we aren't using local storage here. I have some test code that I can cleanup and further test if we are okay with that implementation.

CodeWritingCow commented 3 months ago

@JT0Y it's yours!