Install NextShield
Install it through npm or your favorite dependency manager ๐
npm i next-shieldWrap your app with a shield#
Go to pages/_app.js and wrap the Component with NextShield:
pages/_app.js
import { NextShield } from 'next-shield'import { useRouter } from 'next/router'
import '../styles/globals.css'
export default function MyApp({ Component, pageProps }) { const router = useRouter()
return ( <NextShield> <Component {...pageProps} /> </NextShield> )}