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
components/product/ProductView
pages

@ -53,10 +53,10 @@
} }
.sidebar { .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 { @screen lg {
@apply col-span-6 pt-20; @apply col-span-6 py-24 justify-between;
} }
} }

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

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