mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Same basic idea as https://github.com/vercel/next.js/pull/78787 This test suite has a lot of timeouts with rspack, which causes it to take a long time to run (though not quite long enough that it breaks the job). In general, large test suites are good to break up, because they benefit from parallelism. --- In addition to breaking this test suite up, I also ported it to the new framework, as the way it was patching `next.config.js` was causing problems, since the old integration tests are not run in isolated directories.
26 lines
512 B
JavaScript
26 lines
512 B
JavaScript
import Link from 'next/link'
|
|
import { useRouter } from 'next/router'
|
|
|
|
export async function getServerSideProps({ query }) {
|
|
return {
|
|
props: { href: query.href || '/' },
|
|
}
|
|
}
|
|
|
|
export default function Linker({ href }) {
|
|
const router = useRouter()
|
|
const pushRoute = () => {
|
|
router.push(href)
|
|
}
|
|
return (
|
|
<div>
|
|
<Link href={href} id="link">
|
|
link to{href}
|
|
</Link>
|
|
<button id="route-pusher" onClick={pushRoute}>
|
|
push route {href}
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|