Added shared layout with _app

This commit is contained in:
Luis Alvarez
2020-10-01 21:30:08 -05:00
parent 6587ab10ae
commit cf7c85e3ba
4 changed files with 21 additions and 15 deletions

View File

@@ -43,7 +43,7 @@ export async function getStaticPaths() {
}
}
export default function Home({
export default function Slug({
product,
productData,
}: InferGetStaticPropsType<typeof getStaticProps>) {
@@ -51,13 +51,11 @@ export default function Home({
const router = useRouter()
return (
<Layout>
{router.isFallback ? (
<h1>Loading...</h1>
) : (
<ProductView productData={productData} />
)}
</Layout>
return router.isFallback ? (
<h1>Loading...</h1>
) : (
<ProductView productData={productData} />
)
}
Slug.Layout = Layout