-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
183 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/app-prefetch/app/prefetch-auto-route-groups/(dashboard)/loading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Loading() { | ||
return <h1>Loading...</h1> | ||
} |
13 changes: 13 additions & 0 deletions
13
test/e2e/app-dir/app-prefetch/app/prefetch-auto-route-groups/(dashboard)/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { fetchCount, fetchData } from '../fetch-data' | ||
|
||
export default async function Home() { | ||
const data = await fetchData() | ||
return ( | ||
<h1> | ||
Dashboard {data} | ||
<div> | ||
Fetch Count: <span id="count">{fetchCount}</span> | ||
</div> | ||
</h1> | ||
) | ||
} |
9 changes: 9 additions & 0 deletions
9
test/e2e/app-dir/app-prefetch/app/prefetch-auto-route-groups/fetch-data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export let fetchCount = 0 | ||
export async function fetchData(): Promise<string> { | ||
return new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
resolve('data') | ||
fetchCount++ | ||
}, 1000) | ||
}) | ||
} |
30 changes: 30 additions & 0 deletions
30
test/e2e/app-dir/app-prefetch/app/prefetch-auto-route-groups/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export const dynamic = 'force-dynamic' | ||
|
||
import Link from 'next/link' | ||
|
||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<> | ||
<nav className="bg-gray-800"> | ||
<ul className="flex"> | ||
<li className="mr-6"> | ||
<Link href="/prefetch-auto-route-groups"> | ||
<p className="text-white hover:text-gray-300">Dashboard</p> | ||
</Link> | ||
</li> | ||
<li className="mr-6"> | ||
<Link href="/prefetch-auto-route-groups/sub/foo"> | ||
<p className="text-white hover:text-gray-300">Foo</p> | ||
</Link> | ||
</li> | ||
<li className="mr-6"> | ||
<Link href="/prefetch-auto-route-groups/sub/bar"> | ||
<p className="text-white hover:text-gray-300">Bar</p> | ||
</Link> | ||
</li> | ||
</ul> | ||
</nav> | ||
{children} | ||
</> | ||
) | ||
} |
7 changes: 7 additions & 0 deletions
7
test/e2e/app-dir/app-prefetch/app/prefetch-auto-route-groups/sub/bar/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { fetchData } from '../../fetch-data' | ||
|
||
export default async function Integrations() { | ||
const data = await fetchData() | ||
|
||
return <h1>Bar Page {data}</h1> | ||
} |
6 changes: 6 additions & 0 deletions
6
test/e2e/app-dir/app-prefetch/app/prefetch-auto-route-groups/sub/foo/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { fetchData } from '../../fetch-data' | ||
|
||
export default async function Home() { | ||
const data = await fetchData() | ||
return <h1>Foo Page {data}</h1> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters