add: links to cart, address and checkout page
This commit is contained in:
@@ -5,6 +5,7 @@ import { useReceiptStore } from '@/zustand/receiptStore';
|
||||
import { motion } from 'framer-motion';
|
||||
import { ArrowLeft, Trash } from 'iconsax-react';
|
||||
import { PlusIcon, MinusIcon } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -114,9 +115,12 @@ const CartIndex = ({ }: Props) => {
|
||||
<div className='text-xs'>{t('SumOfItemsLabel')}</div>
|
||||
<div className="text-sm font-medium">{t('SumOfItemsValue').replace('{price}', '560.000')}</div>
|
||||
</div>
|
||||
<Button>
|
||||
{t('ButtonCheckout')}
|
||||
</Button>
|
||||
<Link
|
||||
href={'order/checkout/0'}>
|
||||
<Button>
|
||||
{t('ButtonCheckout')}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,17 +9,18 @@ import clsx from 'clsx';
|
||||
import { motion } from 'framer-motion';
|
||||
import { ArrowLeft, Box, Card, Cup, Icon, Shop, Ticket, TicketDiscount, TruckTick, Wallet2 } from 'iconsax-react';
|
||||
import { ChevronLeft, MinusIcon, PlusIcon } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
import React, { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
type Params = {
|
||||
id: string
|
||||
id: string,
|
||||
name: string,
|
||||
}
|
||||
|
||||
|
||||
function OrderDetailInex() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const params = useParams<Params>();
|
||||
const { t } = useTranslation('parallels', { keyPrefix: 'OrderDetail' });
|
||||
const router = useRouter();
|
||||
@@ -87,13 +88,15 @@ function OrderDetailInex() {
|
||||
<div className="py-3">
|
||||
<div className='w-full flex justify-between items-center gap-2'>
|
||||
<h3 className="text-sm2 font-medium leading-5 inline-block">{t("SectionAddress.Title")}</h3>
|
||||
<button
|
||||
className='text-sm2 text-primary cursor-pointer'
|
||||
onClick={() => { /* Handle address change */ }}
|
||||
>
|
||||
{t("SectionAddress.ButtonChangeAddress")}
|
||||
<ChevronLeft className='inline-block mr-1 mb-0.5 stroke-primary' size='16' />
|
||||
</button>
|
||||
<Link href={`/${params.name}/profile/address?redirect=/${params.name}/order/checkout/${params.id}`}>
|
||||
<button
|
||||
className='text-sm2 text-primary cursor-pointer'
|
||||
onClick={() => { /* Handle address change */ }}
|
||||
>
|
||||
{t("SectionAddress.ButtonChangeAddress")}
|
||||
<ChevronLeft className='inline-block mr-1 mb-0.5 stroke-primary' size='16' />
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
<p className='mt-6 text-sm2'>
|
||||
{address}
|
||||
|
||||
Reference in New Issue
Block a user