mirror of
https://github.com/vercel/commerce.git
synced 2025-08-18 23:01:23 +00:00
.github
.vscode
app
components
cart
layout
modules
pages
category-page-preview.tsx
category-page.tsx
home-page-preview.tsx
home-page.tsx
product-page-preview.tsx
product-page.tsx
search-page-preview.tsx
search-page.tsx
single-page-preview.tsx
single-page.tsx
preview
product
search
ui
loading-dots.tsx
price.tsx
prose.tsx
helpers
lib
messages
public
.env.example
.eslintrc.js
.gitignore
.npmrc
.nvmrc
.prettierignore
README.md
components.json
i18n-config.ts
license.md
middleware.ts
next.config.js
package.json
playwright.config.ts
pnpm-lock.yaml
postcss.config.js
prettier.config.js
sanity.config.ts
tailwind.config.js
tsconfig.json
23 lines
587 B
TypeScript
23 lines
587 B
TypeScript
'use client';
|
|
|
|
import dynamic from 'next/dynamic';
|
|
import { SinglePageParams } from './single-page';
|
|
|
|
const SinglePage = dynamic(() => import('./single-page'));
|
|
const PreviewBanner = dynamic(() => import('../ui/preview-banner/preview-banner'));
|
|
|
|
export default function SinglePagePreview({ data }: SinglePageParams) {
|
|
if (!data) {
|
|
return (
|
|
<div className="text-center">Please start editing your Page document to see the preview!</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<SinglePage data={data} />
|
|
<PreviewBanner title={data?.title ? data.title : ''} />
|
|
</>
|
|
);
|
|
}
|