mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
After enabling Draft Mode, `router.refresh()` was incorrectly causing the page to crash and do a full page refresh. This PR fixes this case. Co-authored-by: Steven <[email protected]>
16 lines
308 B
TypeScript
16 lines
308 B
TypeScript
import React from 'react'
|
|
import { RouteRefresher } from '../../../components/RouterRefresh'
|
|
|
|
export default async function Page() {
|
|
return (
|
|
<main>
|
|
<h1>With generateStaticParams</h1>
|
|
<RouteRefresher />
|
|
</main>
|
|
)
|
|
}
|
|
|
|
export function generateStaticParams() {
|
|
return [{ id: 'foo' }]
|
|
}
|