mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 22:42:33 +00:00
HTMLContent
This commit is contained in:
parent
f60ee2d9ec
commit
177a6f530e
@ -1,12 +1,12 @@
|
||||
import cn from 'classnames'
|
||||
import s from './PageContent.module.css'
|
||||
import s from './HTMLContent.module.css'
|
||||
|
||||
type Props = {
|
||||
className?: 'string'
|
||||
html: string
|
||||
}
|
||||
|
||||
export default function PageContent({ className, html }: Props) {
|
||||
export default function HTMLContent({ className, html }: Props) {
|
||||
return (
|
||||
<div
|
||||
className={cn(s.root, className)}
|
1
components/core/HTMLContent/index.ts
Normal file
1
components/core/HTMLContent/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { default } from './HTMLContent'
|
@ -7,3 +7,4 @@ export { default as Searchbar } from './Searchbar'
|
||||
export { default as UserNav } from './UserNav'
|
||||
export { default as Toggle } from './Toggle'
|
||||
export { default as Head } from './Head'
|
||||
export { default as HTMLContent } from './HTMLContent'
|
||||
|
@ -1 +0,0 @@
|
||||
export { default } from './PageContent'
|
@ -1,9 +1,8 @@
|
||||
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
|
||||
import { Layout } from '@components/core'
|
||||
import getAllPages from '@lib/bigcommerce/api/operations/get-all-pages'
|
||||
import getPage from '@lib/bigcommerce/api/operations/get-page'
|
||||
import getSlug from '@utils/get-slug'
|
||||
import PageContent from '@components/custom-pages/PageContent'
|
||||
import getPage from '@lib/bigcommerce/api/operations/get-page'
|
||||
import getAllPages from '@lib/bigcommerce/api/operations/get-all-pages'
|
||||
import { Layout, HTMLContent } from '@components/core'
|
||||
|
||||
export async function getStaticProps({
|
||||
preview,
|
||||
@ -40,7 +39,7 @@ export default function Pages({
|
||||
}: InferGetStaticPropsType<typeof getStaticProps>) {
|
||||
return (
|
||||
<div className="max-w-2xl mx-auto py-20">
|
||||
<PageContent html={page.body} />
|
||||
<HTMLContent html={page.body} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user