e27203f89b
* Update escape string regexp operators * temp * Extract getRouteRegex func * First iteration of dynamic routing for production only * Correctly order prod * Add serverless support * Single line it * noop routes * Format doc * Fix dynamic routing for dev * Add flag for dynamic routing * Update packages/next-server/lib/router/router.ts Co-Authored-By: JJ Kasper <jj@jjsweb.site> * remove example * Add router tests * Format code * Sort routes * Update to not use posix path methods
14 lines
232 B
JavaScript
14 lines
232 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
export default () => {
|
|
const router = useRouter()
|
|
const { post, id } = router.query
|
|
|
|
return (
|
|
<>
|
|
<p>
|
|
Blog post {post} comment {id || '(all)'}
|
|
</p>
|
|
</>
|
|
)
|
|
}
|