4
0
forked from crowetic/commerce

Product View Text

This commit is contained in:
Belen Curcio 2020-10-24 19:27:20 -03:00
parent a1c4c16deb
commit 7d48c22c23
3 changed files with 17 additions and 18 deletions

View File

@ -53,10 +53,10 @@
}
.sidebar {
@apply flex flex-col col-span-1 mx-auto max-w-8xl px-6 w-full;
@apply flex flex-col col-span-1 mx-auto max-w-8xl px-6 w-full h-full;
@screen lg {
@apply col-span-6 pt-20;
@apply col-span-6 py-24 justify-between;
}
}

View File

@ -6,8 +6,9 @@ import { NextSeo } from 'next-seo'
import s from './ProductView.module.css'
import { Heart } from '@components/icon'
import { useUI } from '@components/ui/context'
import { Button, Container } from '@components/ui'
import { Swatch, ProductSlider } from '@components/product'
import { Button, Container } from '@components/ui'
import { HTMLContent } from '@components/core'
import useAddItem from '@lib/bigcommerce/cart/use-add-item'
import type { ProductNode } from '@lib/bigcommerce/api/operations/get-product'
@ -123,21 +124,21 @@ const ProductView: FC<Props> = ({ product, className }) => {
</div>
</div>
))}
<div className="pb-12">
<div
className="pb-14 break-words w-full"
dangerouslySetInnerHTML={{ __html: product.description }}
/>
<Button
type="button"
className={s.button}
onClick={addToCart}
loading={loading}
>
Add to Cart
</Button>
<div className="pb-14 break-words w-full max-w-xl">
<HTMLContent html={product.description} />
</div>
</section>
<div>
<Button
type="button"
className={s.button}
onClick={addToCart}
loading={loading}
>
Add to Cart
</Button>
</div>
</div>
{/* TODO make it work */}

View File

@ -37,8 +37,6 @@ export default function Cart({}: InferGetStaticPropsType<
const error = null
const success = null
console.log(items)
return (
<div className="grid lg:grid-cols-12">
<div className="lg:col-span-8">