mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
10f2268f4e
This PR adds Zod to the precompiled libraries, and use it to create schemas for the router state tree for validation. In other planned features/changes, Zod will also be used to do run-time data validation. Fixes NEXT-135.
20 lines
488 B
JavaScript
20 lines
488 B
JavaScript
export default function Root({ children }) {
|
|
return (
|
|
<html>
|
|
<head>
|
|
<title>Hello World</title>
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `if (location.search.includes('bot')) {
|
|
Object.defineProperty(navigator, 'userAgent', {
|
|
value: new URLSearchParams(location.search).get("useragent"),
|
|
});
|
|
}`,
|
|
}}
|
|
/>
|
|
</head>
|
|
<body>{children}</body>
|
|
</html>
|
|
)
|
|
}
|