-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add country code to geogate analytic #1770
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -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 }>, { |
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.
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
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
closes #1771
What changed? Why?
PlanetScale deploy request
Notes to reviewers
How has it been tested?