Skip to content

Commit 702d654

Browse files
committed
test: vercel serverless scope
Signed-off-by: Innei <[email protected]>
1 parent b3eec57 commit 702d654

File tree

4 files changed

+1739
-2
lines changed

4 files changed

+1739
-2
lines changed

src/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { headers } from 'next/dist/client/components/headers'
88
import { ClerkProvider } from '@clerk/nextjs'
99

1010
import { Root } from '~/components/layout/root/Root'
11-
import { REQUEST_PATHNAME } from '~/constants/system'
11+
import { REQUEST_GEO, REQUEST_PATHNAME } from '~/constants/system'
1212
import { defineMetadata } from '~/lib/define-metadata'
1313
import { sansFont, serifFont } from '~/lib/fonts'
1414
import { 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 />

src/constants/system.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export const REQUEST_PATHNAME = 'request_pathname'
22
export const REQUEST_QUERY = 'request_query'
3+
4+
export const REQUEST_GEO = 'request_geo'

0 commit comments

Comments
 (0)