diff --git a/src/app/[name]/(Dialogs)/cart/page.tsx b/src/app/[name]/(Dialogs)/cart/page.tsx index ccf6c51..03da35f 100644 --- a/src/app/[name]/(Dialogs)/cart/page.tsx +++ b/src/app/[name]/(Dialogs)/cart/page.tsx @@ -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) => {
{t('SumOfItemsLabel')}
{t('SumOfItemsValue').replace('{price}', '560.000')}
- + + + diff --git a/src/app/[name]/(Dialogs)/order/checkout/[id]/page.tsx b/src/app/[name]/(Dialogs)/order/checkout/[id]/page.tsx index a6d4a2b..7afc0c9 100644 --- a/src/app/[name]/(Dialogs)/order/checkout/[id]/page.tsx +++ b/src/app/[name]/(Dialogs)/order/checkout/[id]/page.tsx @@ -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(); const { t } = useTranslation('parallels', { keyPrefix: 'OrderDetail' }); const router = useRouter(); @@ -87,13 +88,15 @@ function OrderDetailInex() {

{t("SectionAddress.Title")}

- + + +

{address} diff --git a/src/app/[name]/(Profile)/profile/address/page.tsx b/src/app/[name]/(Profile)/profile/address/page.tsx index 9b5e393..6513a31 100644 --- a/src/app/[name]/(Profile)/profile/address/page.tsx +++ b/src/app/[name]/(Profile)/profile/address/page.tsx @@ -6,13 +6,21 @@ import { ef } from '@/lib/helpers/utfNumbers'; // import { useAuthStore } from '@/zustand/authStore'; import { ArrowLeft, Edit2, TickCircle } from 'iconsax-react'; import Link from 'next/link'; -import { useRouter } from 'next/navigation'; +import { useRouter, useSearchParams } from 'next/navigation'; import React from 'react' type Props = object function UserAddressesPage({ }: Props) { const router = useRouter(); + const searchParams = useSearchParams(); + const redirect = searchParams.get('redirect'); + + const onSelected = () => { + if(redirect) { + router.replace(redirect); + } + } return (

@@ -43,7 +51,10 @@ function UserAddressesPage({ }: Props) { {ef('ارسال: 10,000 تومان')}

-