From 3a72b8e933167df30d02de169d62c1fd70a8b9cd Mon Sep 17 00:00:00 2001 From: Mohammed Al-yaseen Date: Wed, 14 Jan 2026 18:53:09 +0300 Subject: [PATCH] fix transations --- src/pages/menu/components/CategoriesList/CategoriesList.tsx | 1 - src/pages/menu/components/MenuList/MenuList.tsx | 5 +++-- src/pages/menu/components/MenuList/ProductCard.tsx | 4 ++-- src/utils/types/appTypes.ts | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pages/menu/components/CategoriesList/CategoriesList.tsx b/src/pages/menu/components/CategoriesList/CategoriesList.tsx index dc9f527..79b2fac 100644 --- a/src/pages/menu/components/CategoriesList/CategoriesList.tsx +++ b/src/pages/menu/components/CategoriesList/CategoriesList.tsx @@ -4,7 +4,6 @@ import ProText from "components/ProText"; import { useScrollHandler } from "contexts/ScrollHandlerContext"; import { useCallback, useEffect, useRef } from "react"; import { useAppSelector } from "redux/hooks"; -import { colors } from "ThemeConstants"; import { default_image } from "utils/constants"; import { Category } from "utils/types/appTypes"; import styles from "./CategoriesList.module.css"; diff --git a/src/pages/menu/components/MenuList/MenuList.tsx b/src/pages/menu/components/MenuList/MenuList.tsx index 6b35a58..83ebd4c 100644 --- a/src/pages/menu/components/MenuList/MenuList.tsx +++ b/src/pages/menu/components/MenuList/MenuList.tsx @@ -8,6 +8,7 @@ import styles from "./MenuList.module.css"; import ProductCard from "pages/menu/components/MenuList/ProductCard.tsx"; import { ProductBottomSheet } from "pages/product/components/ProductBottomSheet"; import { useState } from "react"; +import { Category } from "utils/types/appTypes"; interface MenuListProps { data: @@ -54,7 +55,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) { return ( <>
- {data?.categories?.map((category, index) => { + {data?.categories?.map((category: Category, index) => { const categoryProducts = productsByCategory?.[category.id] || []; if (categoryProducts.length === 0) return null; @@ -81,7 +82,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) { }} level={5} > - {isRTL ? category.name : category.name} + {isRTL ? category.nameAR : category.nameEN} )}
diff --git a/src/pages/menu/components/MenuList/ProductCard.tsx b/src/pages/menu/components/MenuList/ProductCard.tsx index 2c6d0ba..71d5987 100644 --- a/src/pages/menu/components/MenuList/ProductCard.tsx +++ b/src/pages/menu/components/MenuList/ProductCard.tsx @@ -101,7 +101,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) { letterSpacing: "0%", }} > - {isRTL ? item.nameOther : item.name} + {isRTL ? item.nameAR : item.nameEN} {item.description && ( - {item.description} + {isRTL ? item.descriptionAR : item.descriptionEN} )} diff --git a/src/utils/types/appTypes.ts b/src/utils/types/appTypes.ts index bb1404f..015b437 100644 --- a/src/utils/types/appTypes.ts +++ b/src/utils/types/appTypes.ts @@ -576,12 +576,15 @@ export interface Product { isHasLoyalty: boolean; name: string; nameOther: string; + nameAR: string; + nameEN: string; price: number; pricing_method: string; original_price: number; preperation_minutes: number; description: string; descriptionAR: string; + descriptionEN: string; image: string; imageNew: string; image_small: string;