Files
Shu Ding 10f2268f4e Add Zod and router state validation (#46962)
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.
2023-03-10 13:37:45 +00:00

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>
)
}