add: links to cart, address and checkout page

This commit is contained in:
Mahyar Khanbolooki
2025-08-12 03:56:14 +03:30
parent b4451d2495
commit 00c491aec5
3 changed files with 32 additions and 14 deletions
@@ -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 (
<div className='overflow-y-auto h-full noscrollbar flex flex-col'>
@@ -43,7 +51,10 @@ function UserAddressesPage({ }: Props) {
{ef('ارسال: 10,000 تومان')}
</p>
<div className="flex justify-between items-center mt-4">
<Button className='!bg-background !text-foreground flex items-center gap-2 text-xs h-8'>
<Button
onClick={onSelected}
className='!bg-background !text-foreground flex items-center gap-2 text-xs h-8'
>
<TickCircle variant='Bold' className='fill-foreground stroke-background size-4.5 mb-0.5' />
تنظیم به عنوان فعال
</Button>