import { useRouter } from 'next/router' export const getStaticProps = () => { return { props: { hello: 'world', }, } } export const getStaticPaths = () => { return { paths: ['/api-docs/first'], fallback: false, } } export default function Slug(props) { if (useRouter().isFallback) return 'Loading...' return ( <>
API Docs
{JSON.stringify(props)}
> ) }