'use client'; import Button from '@/components/button/PrimaryButton'; import CalendarIcon from '@/components/icons/CalendarIcon'; 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 = [ { id: 0, address: 'خیابان دانشگاه روبروی بیمارستان خوانساری ساختمان مهر...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 1, address: '1...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 2, address: '2...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 3, address: '3...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 7, address: '2...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 4, address: '3...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 5, address: '2...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, { id: 6, address: '3...', date: 'دوشنبه، 28 مرداد 1403', price: '560,000', items: [ { id: 0, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 1, quantity: 1, image: '/assets/images/food-preview.png' }, { id: 2, quantity: 2, image: '/assets/images/food-preview.png' }, ] }, ] function OrdersIndex() { const { t } = useTranslation('orders'); const categories = [ { id: 0, title: t('Tab.ActiveOrders'), icon: }, { id: 1, title: t('Tab.PreviousOrders'), icon: } ] const firstTab = () => { return currentOrders.map((order) => { return (

{order.address}

{order.date}


{order.items.map((item) => { return ( order image {item.quantity} ) })}
{order.price} T
) }) } return (
{firstTab()}} title={categories[0].title} icon={categories[0].icon}>
empty
} title={categories[1].title} icon={categories[1].icon}>
) } export default OrdersIndex