34 lines
852 B
TypeScript
34 lines
852 B
TypeScript
'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='bw-cart-wrapper mx-auto my-8 max-w-[640px] text-brand-violet'>
|
|
<h1 className='mb-6 border-b border-b-brand-violet pb-6 text-3xl font-bold'>
|
|
{t('basket')}
|
|
</h1>
|
|
<header className='flex text-xl'>
|
|
<div className='col'>{t('title')}</div>
|
|
<div className='flex-none'>{t('quantity')}</div>
|
|
<div className='col text-right'>{t('amount')}</div>
|
|
</header>
|
|
<CartItems />
|
|
</section>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|