diff --git a/src/app/[locale]/[name]/orders/page.tsx b/src/app/[locale]/[name]/orders/page.tsx index 1e77ef5..724ca5e 100644 --- a/src/app/[locale]/[name]/orders/page.tsx +++ b/src/app/[locale]/[name]/orders/page.tsx @@ -6,8 +6,10 @@ import LocationPinIcon from '@/components/icons/LocationPinIcon'; import PerformantTabRenderer from '@/components/tab/PerformantTabRenderer'; import TabContainer from '@/components/tab/TabContainer' import { TabHeader } from '@/components/tab/TabHeader'; +import { Receipt2, ReceiptItem } from 'iconsax-react'; import Image from 'next/image'; import React from 'react' +import { useTranslation } from 'react-i18next'; const currentOrders = [ { @@ -101,9 +103,12 @@ const currentOrders = [ ] function OrdersIndex() { + + const { t } = useTranslation('orders'); + const categories = [ - { id: 0, title: 'سفارشات فعال', image: '/assets/images/food-image.png' }, - { id: 1, title: 'سفارشات قبلی', image: '/assets/images/food-image.png' } + { id: 0, title: t('Tab.ActiveOrders'), icon: }, + { id: 1, title: t('Tab.PreviousOrders'), icon: } ] const firstTab = () => { @@ -148,7 +153,7 @@ function OrdersIndex() { - + ) }) @@ -159,12 +164,12 @@ function OrdersIndex() {
{firstTab()}} - title={categories[0].title} imageSrc={categories[0].image}> + viewRenderer={{firstTab()}} + title={categories[0].title} icon={categories[0].icon}>
empty
} - title={categories[0].title} imageSrc={categories[0].image}> + title={categories[1].title} icon={categories[1].icon}>
diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 9adc1d5..51a436f 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -11,7 +11,7 @@ export const metadata: Metadata = { description: 'Webapp dashboard' } -const i18nNamespaces = ['common', 'menu', 'auth']; +const i18nNamespaces = ['common', 'menu', 'orders', 'auth']; export default async function RootLayout({ children, diff --git a/src/locales/fa/orders.json b/src/locales/fa/orders.json new file mode 100644 index 0000000..6655011 --- /dev/null +++ b/src/locales/fa/orders.json @@ -0,0 +1,9 @@ +{ + "Tab": { + "ActiveOrders": "سفارشات فعال", + "PreviousOrders": "سفارشات قبلی" + }, + "Card": { + "TrackOrder": "پیگیری سفارش" + } +} \ No newline at end of file