fix transations
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
<div className={styles.menuSections}>
|
||||
{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}
|
||||
</ProTitle>
|
||||
)}
|
||||
<div className={styles.menuItemsGrid}>
|
||||
|
||||
@@ -101,7 +101,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
|
||||
letterSpacing: "0%",
|
||||
}}
|
||||
>
|
||||
{isRTL ? item.nameOther : item.name}
|
||||
{isRTL ? item.nameAR : item.nameEN}
|
||||
</ProText>
|
||||
{item.description && (
|
||||
<ProText
|
||||
@@ -124,7 +124,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
|
||||
letterSpacing: "0%",
|
||||
}}
|
||||
>
|
||||
{item.description}
|
||||
{isRTL ? item.descriptionAR : item.descriptionEN}
|
||||
</ProText>
|
||||
)}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user