4
0
forked from crowetic/commerce

HTMLContent

This commit is contained in:
Belen Curcio 2020-10-16 12:13:26 -03:00
parent f60ee2d9ec
commit 177a6f530e
6 changed files with 8 additions and 8 deletions

View File

@ -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)}

View File

@ -0,0 +1 @@
export { default } from './HTMLContent'

View File

@ -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'

View File

@ -1 +0,0 @@
export { default } from './PageContent'

View File

@ -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>
)
}