From 0c41316411ef8ff5cbaa6adcaea4ec61f17fe7fc Mon Sep 17 00:00:00 2001 From: Mahyar Khanbolooki Date: Wed, 30 Jul 2025 00:59:39 +0330 Subject: [PATCH] fix: cart layouts --- src/app/[name]/cart/page.tsx | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/app/[name]/cart/page.tsx b/src/app/[name]/cart/page.tsx index faed11d..c73c94f 100644 --- a/src/app/[name]/cart/page.tsx +++ b/src/app/[name]/cart/page.tsx @@ -4,25 +4,41 @@ import Button from '@/components/button/PrimaryButton'; import { ScrollArea } from '@/components/ui/scrollarea'; import { useReceiptStore } from '@/zustand/receiptStore'; import { motion } from 'framer-motion'; -import { Trash } from 'iconsax-react'; +import { ArrowLeft, Trash } from 'iconsax-react'; import { PlusIcon, MinusIcon } from 'lucide-react'; +import { useRouter } from 'next/navigation'; import React from 'react' type Props = object const CartIndex = ({ }: Props) => { + const router = useRouter(); const quantity = useReceiptStore(state => state.items[0]?.quantity || 0); const increment = useReceiptStore(state => state.increment); const decrement = useReceiptStore(state => state.decrement); return ( -
-

سبد خرید

+
+

+ { router.back() }} + /> + سبد خرید + { router.back() }} + /> +

- +
-
    +
    • کباب چوبی ژیوان (سیخ چوبی)
      @@ -88,14 +104,14 @@ const CartIndex = ({ }: Props) => {
-
+
جمع خرید:
560.000 تومان
- +
)