mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
69d9d2909c
React already disallows javascript URLs. This change extends this prohibition to Next.js specific APIs that don't serialize to an href on an anchor tag. There are workarounds if need be but this is considered a bugfix because these URLs are non-routable and the affected APIs were never intended to work with these URLs. This replaces prior efforts here: https://github.com/vercel/next.js/pull/64779/ which attempted to make this capability optional. We decided it was just not supportable and since workarounds exist the burden of upgrading through this bugfix is acceptable. --------- Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
13 lines
253 B
TypeScript
13 lines
253 B
TypeScript
import Link from 'next/link'
|
|
|
|
export default function Root({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
<main>{children}</main>
|
|
<Link href="/app/safe">Safe Page</Link>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|