3a22c4c554
The Contributing guidelines say TypeScript should be leveraged for new examples, so I thought I'd convert this example over. I also: - Upgraded all dependencies - Replaced the `prop-types` package with TypeScript types ## Documentation / Examples - [X] Make sure the linting passes by running `pnpm lint` - [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
14 lines
248 B
TypeScript
14 lines
248 B
TypeScript
import { useRouter } from 'next/router'
|
|
import Nav from '../components/Nav'
|
|
|
|
const SlugPage = () => {
|
|
const { asPath } = useRouter()
|
|
return (
|
|
<>
|
|
<Nav />
|
|
<p>Hello, I'm the {asPath} page</p>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default SlugPage
|