next.js/test/integration/preload-viewport/pages/bot-user-agent.js
bot-user-agent.js23 lines489 B
import Head from 'next/head'
import Link from 'next/link'

export default () => {
  return (
    <div>
      <Head>
        <script
          dangerouslySetInnerHTML={{
            __html: `Object.defineProperty(navigator, 'userAgent', {
              value: new URLSearchParams(location.search).get("useragent"),
            });`,
          }}
        ></script>
      </Head>
      <br />
      <Link href="/another" id="link-another">
        to /another
      </Link>
    </div>
  )
}
Quest for Codev2.0.0
/
SIGN IN