mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Fix slugs for pages
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
'use client'
|
||||
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
const DynamicContentManager = dynamic(
|
||||
() => import('components/layout/dynamic-content-manager')
|
||||
)
|
||||
import DynamicContentManager from 'components/layout/dynamic-content-manager';
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
interface SinglePageProps {
|
||||
data: any
|
||||
data: object | any
|
||||
}
|
||||
|
||||
const SinglePage = ({ data }: SinglePageProps) => {
|
||||
// This is a Client Component. It receives data as props and
|
||||
// has access to state and effects just like Page components
|
||||
// in the `pages` directory.
|
||||
export default function SinglePage({data }: SinglePageProps) {
|
||||
|
||||
if (!data) {
|
||||
return notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<DynamicContentManager content={data?.content} />
|
||||
)
|
||||
}
|
||||
|
||||
export default SinglePage
|
||||
|
Reference in New Issue
Block a user