We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7daa32a commit cd52c07Copy full SHA for cd52c07
demos/default/app/app-edge/layout.tsx
@@ -0,0 +1,11 @@
1
+'use client'
2
+
3
+// TODO-APP: support typing for useSelectedLayoutSegment
4
+// @ts-ignore
5
+import { useSelectedLayoutSegments } from 'next/navigation'
6
7
+export default function Layout({ children }: { children: React.ReactNode }) {
8
+ // useSelectedLayoutSegment should not be thrown
9
+ useSelectedLayoutSegments()
10
+ return children
11
+}
demos/default/app/app-edge/page.tsx
@@ -0,0 +1,8 @@
+export default function Page() {
+ if ('EdgeRuntime' in globalThis) {
+ return <p>Edge!</p>
+ }
+ return <p>Node!</p>
+export const runtime = 'experimental-edge'
0 commit comments