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

feat: add country code to geogate analytic #1770

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

lucasrmp-cb
Copy link
Contributor

@lucasrmp-cb lucasrmp-cb commented Jan 23, 2025

closes #1771

What changed? Why?

PlanetScale deploy request

Notes to reviewers

How has it been tested?

  • Locally
  • Vercel Preview Branch
  • Unit test
  • Functional test

@lucasrmp-cb lucasrmp-cb self-assigned this Jan 23, 2025
Copy link

vercel bot commented Jan 23, 2025

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

Name Status Preview Updated (UTC)
swc-web ✅ Ready (Inspect) Visit Preview Jan 28, 2025 3:39pm

@@ -23,7 +24,9 @@ export const GeoGate = (props: GeoGateProps) => {
const userCountryCode = Cookies.get(USER_COUNTRY_CODE_COOKIE_NAME)

if (!isValidCountryCode({ countryCode, userCountryCode, bypassCountryCheck })) {
return unavailableContent
return React.cloneElement(unavailableContent as React.ReactElement<{ countryCode: string }>, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doing it this way to not need to always pass the country code to the fallback and also to not have to change the component signature

@lucasrmp-cb lucasrmp-cb merged commit 952be2a into main Jan 29, 2025
7 checks passed
@lucasrmp-cb lucasrmp-cb deleted the feature/add-country-code-to-geogate-analytics branch January 29, 2025 16:54
Copy link

sentry-io bot commented Jan 29, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: The argument must be a React element, but you passed null. incomplete-app-router-transaction View Issue

Did you find this useful? React with a 👍 or 👎

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.

Add country code to geogate analytics
2 participants