Files
bewell-in-ua/app/[locale]/(root)/(shop)/cart/page.tsx

32 lines
884 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client'
import {useTranslations} from 'next-intl'
import CartItems from '@/components/pages/cart/items'
export default function Cart() {
const t = useTranslations('cart')
// const subtotal = items.reduce(
// (total, item) => total + item.price * item.quantity,
// 0
// )
// const total = subtotal
return (
<div className='mt-1'>
<div className='container'>
<section className='mx-auto my-8 max-w-[640px] text-brand-violet'>
<h1 className='text-3xl font-bold'>{t('basket')}</h1>
<div className='bsdg-brand-violet-200 my-4 grid grid-cols-3 gap-4 border-t-2 border-brand-violet py-4'>
<div className='bg-brand-violet-100'>Назва</div>
<div className='bg-brand-violet-100'>Кількість</div>
<div className='bg-brand-violet-100'>Вартість</div>
</div>
<CartItems />
</section>
</div>
</div>
)
}