File tree Expand file tree Collapse file tree 4 files changed +1739
-2
lines changed
Expand file tree Collapse file tree 4 files changed +1739
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { headers } from 'next/dist/client/components/headers'
88import { ClerkProvider } from '@clerk/nextjs'
99
1010import { Root } from '~/components/layout/root/Root'
11- import { REQUEST_PATHNAME } from '~/constants/system'
11+ import { REQUEST_GEO , REQUEST_PATHNAME } from '~/constants/system'
1212import { defineMetadata } from '~/lib/define-metadata'
1313import { sansFont , serifFont } from '~/lib/fonts'
1414import { getQueryClient } from '~/utils/query-client.server'
@@ -101,6 +101,7 @@ export default async function RootLayout(props: Props) {
101101 return ( shouldHydration as Function ) ?.( query . state . data as any ) ?? false
102102 } ,
103103 } )
104+ const geo = headers ( ) . get ( REQUEST_GEO )
104105
105106 return (
106107 // <ClerkProvider localization={ClerkZhCN}>
@@ -115,6 +116,7 @@ export default async function RootLayout(props: Props) {
115116 </ Hydrate >
116117 </ Providers >
117118 < ToastContainer />
119+ { ! ! geo && < div > { geo } </ div > }
118120 </ body >
119121 </ html >
120122 < Analytics />
Original file line number Diff line number Diff line change 11export const REQUEST_PATHNAME = 'request_pathname'
22export const REQUEST_QUERY = 'request_query'
3+
4+ export const REQUEST_GEO = 'request_geo'
You can’t perform that action at this time.
0 commit comments