-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 701: cookie banner re-rendering #704
Issue 701: cookie banner re-rendering #704
Conversation
Someone is attempting to deploy a commit to the Clean and Green Philly Team on Vercel. A member of the Team first needs to authorize it. |
0911421
to
bd90b7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JT0Y, thanks for contributing! I tested your code in my local environment. When I accept cookies and then open the site in a new browser tab, the cookie banner no longer appears.
However, our GitHub repo's Frontend PR Checks are failing due to this error: ReferenceError: localStorage is not defined
. I'm getting the same error in my localhost ... See screenshot below:
Can you update the PR to resolve this? Thanks!
yes, I came across this issue and was a bit confused on the issue. I am not familiar with SSR and this environment. But I have additional checks that check if this code is running on a client or not. I did some quick googling on this and this seems to be a well documented issue. Please let me know if this is an unusual pattern, as I am new to next.js & SSR, this does feel strange to me. I have tested this and am still able to dismiss the banner and not receiving this issue as well:
|
@JT0Y I ran the updated PR locally, and the Your solution looks sound. By checking if Thanks for your work! |
@CodeWritingCow No worries and thanks for double checking! |
@JT0Y I'll take it from here. Will merge and close this PR! |
#701
This resolves the cookie banner re-rendering by recording/checking the user's local storage.
The issue can be recreated by: