mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Based on: - #87134 --- hmr-refresh-reducer is identical to refresh-reducer except for the fact that it doesn't evict the prefetch cache. So this refactors both implementations to call the same shared function.
27 lines
904 B
TypeScript
27 lines
904 B
TypeScript
import { LinkAccordion } from '../../components/link-accordion'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<div>
|
|
<p>
|
|
Tests what happens if a navigation resolves to a different route than
|
|
the one that was prefetched.
|
|
</p>
|
|
<div>
|
|
<ul>
|
|
<li>
|
|
<LinkAccordion href="/mismatching-prefetch/dynamic-page/a?mismatch-redirect=./b">
|
|
<code>{`/mismatching-prefetch/dynamic-page/a ──[ redirects to ]──→ /mismatching-prefetch/dynamic-page/b`}</code>
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion href="/mismatching-prefetch/dynamic-page/a?mismatch-rewrite=./b">
|
|
<code>{`/mismatching-prefetch/dynamic-page/a ──[ rewrites to ]──→ /mismatching-prefetch/dynamic-page/b`}</code>
|
|
</LinkAccordion>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|