From b4451d24954c437d75fbb8d03d86c0523d78a6ef Mon Sep 17 00:00:00 2001 From: Mahyar Khanbolooki Date: Tue, 12 Aug 2025 03:47:35 +0330 Subject: [PATCH] fix: order page --- src/app/[name]/(Main)/order/history/page.tsx | 61 ++++++++++++++++++- .../{rating => order/rate}/[orderId]/page.tsx | 0 src/locales/fa/orders.json | 4 +- 3 files changed, 62 insertions(+), 3 deletions(-) rename src/app/[name]/(Main)/{rating => order/rate}/[orderId]/page.tsx (100%) diff --git a/src/app/[name]/(Main)/order/history/page.tsx b/src/app/[name]/(Main)/order/history/page.tsx index 724ca5e..0505a2d 100644 --- a/src/app/[name]/(Main)/order/history/page.tsx +++ b/src/app/[name]/(Main)/order/history/page.tsx @@ -8,6 +8,7 @@ import TabContainer from '@/components/tab/TabContainer' import { TabHeader } from '@/components/tab/TabHeader'; import { Receipt2, ReceiptItem } from 'iconsax-react'; import Image from 'next/image'; +import Link from 'next/link'; import React from 'react' import { useTranslation } from 'react-i18next'; @@ -153,7 +154,63 @@ function OrdersIndex() { - + + + + + ) + }) + } + + const secondTab = () => { + return currentOrders.map((order) => { + return ( +
+
+
+ +

{order.address}

+
+
+ +

{order.date}

+
+
+ +
+ +
+
+ {order.items.map((item) => { + return ( + + order image + + {item.quantity} + + + ) + })} +
+
+ {order.price} T +
+
+ +
+ + + + +
+
) }) @@ -168,7 +225,7 @@ function OrdersIndex() { title={categories[0].title} icon={categories[0].icon}>
empty
} + viewRenderer={{secondTab()}} title={categories[1].title} icon={categories[1].icon}>
diff --git a/src/app/[name]/(Main)/rating/[orderId]/page.tsx b/src/app/[name]/(Main)/order/rate/[orderId]/page.tsx similarity index 100% rename from src/app/[name]/(Main)/rating/[orderId]/page.tsx rename to src/app/[name]/(Main)/order/rate/[orderId]/page.tsx diff --git a/src/locales/fa/orders.json b/src/locales/fa/orders.json index 6655011..327fba7 100644 --- a/src/locales/fa/orders.json +++ b/src/locales/fa/orders.json @@ -4,6 +4,8 @@ "PreviousOrders": "سفارشات قبلی" }, "Card": { - "TrackOrder": "پیگیری سفارش" + "TrackOrder": "پیگیری سفارش", + "Reorder": "سفارش مجدد", + "Rate": "ثبت امتیاز" } } \ No newline at end of file