File size: 348 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import { useRouter } from 'next/router'
export async function getServerSideProps({ req }) {
return { props: { url: req.url } }
}
export default function RewriteTarget({ url }) {
const router = useRouter()
return (
<>
<h1>rewrite-target</h1>
<p id="as-path">{router.asPath}</p>
<p id="req-url">{url}</p>
</>
)
}
|