Skip to content
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

fix: syntax error in demo GA script & hydration warning #1333

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

jakehobbs
Copy link
Member

@jakehobbs jakehobbs commented Feb 7, 2025

These issues have been displaying in the console on the demo app:

Screenshot 2025-02-07 at 10 51 56 AM
Screenshot 2025-02-07 at 10 52 35 AM

The first is due to the GA ID not being quoted.

The second is due to the UserAvatar colors being randomly shuffled, so the colors to not match between the server and client render.

Pull Request Checklist


PR-Codex overview

This PR focuses on improving the UserAvatar component by changing the color shuffling logic to ensure consistent rendering between server and client. It also updates the Google Analytics configuration.

Detailed summary

  • Updated gtag configuration syntax in GoogleAnalytics.tsx.
  • Replaced shuffleColors with shuffleColorsDeterministically in UserAvatar.tsx for consistent color ordering.
  • Modified useMemo dependency to include address in UserAvatar.tsx.
  • Refactored color shuffling logic to use a seed for deterministic results.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 8:08pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 8:08pm

Copy link

graphite-app bot commented Feb 7, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@jakehobbs jakehobbs force-pushed the jake/fix-GA-console-error branch from 4fc5f7e to 9460603 Compare February 7, 2025 19:48
@jakehobbs jakehobbs changed the title fix: demo GA ID & hydration warning fix: syntax eror in demo GA script & hydration warning Feb 7, 2025
@jakehobbs jakehobbs changed the title fix: syntax eror in demo GA script & hydration warning fix: syntax error in demo GA script & hydration warning Feb 7, 2025
Copy link
Collaborator

@adamegyed adamegyed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@jakehobbs jakehobbs merged commit df1d99a into main Feb 7, 2025
7 checks passed
@jakehobbs jakehobbs deleted the jake/fix-GA-console-error branch February 7, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants