fix transations

This commit is contained in:
2026-01-14 18:53:09 +03:00
parent 9d061ae8a6
commit 3a72b8e933
4 changed files with 8 additions and 5 deletions

View File

@@ -4,7 +4,6 @@ import ProText from "components/ProText";
import { useScrollHandler } from "contexts/ScrollHandlerContext"; import { useScrollHandler } from "contexts/ScrollHandlerContext";
import { useCallback, useEffect, useRef } from "react"; import { useCallback, useEffect, useRef } from "react";
import { useAppSelector } from "redux/hooks"; import { useAppSelector } from "redux/hooks";
import { colors } from "ThemeConstants";
import { default_image } from "utils/constants"; import { default_image } from "utils/constants";
import { Category } from "utils/types/appTypes"; import { Category } from "utils/types/appTypes";
import styles from "./CategoriesList.module.css"; import styles from "./CategoriesList.module.css";

View File

@@ -8,6 +8,7 @@ import styles from "./MenuList.module.css";
import ProductCard from "pages/menu/components/MenuList/ProductCard.tsx"; import ProductCard from "pages/menu/components/MenuList/ProductCard.tsx";
import { ProductBottomSheet } from "pages/product/components/ProductBottomSheet"; import { ProductBottomSheet } from "pages/product/components/ProductBottomSheet";
import { useState } from "react"; import { useState } from "react";
import { Category } from "utils/types/appTypes";
interface MenuListProps { interface MenuListProps {
data: data:
@@ -54,7 +55,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
return ( return (
<> <>
<div className={styles.menuSections}> <div className={styles.menuSections}>
{data?.categories?.map((category, index) => { {data?.categories?.map((category: Category, index) => {
const categoryProducts = productsByCategory?.[category.id] || []; const categoryProducts = productsByCategory?.[category.id] || [];
if (categoryProducts.length === 0) return null; if (categoryProducts.length === 0) return null;
@@ -81,7 +82,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
}} }}
level={5} level={5}
> >
{isRTL ? category.name : category.name} {isRTL ? category.nameAR : category.nameEN}
</ProTitle> </ProTitle>
)} )}
<div className={styles.menuItemsGrid}> <div className={styles.menuItemsGrid}>

View File

@@ -101,7 +101,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
letterSpacing: "0%", letterSpacing: "0%",
}} }}
> >
{isRTL ? item.nameOther : item.name} {isRTL ? item.nameAR : item.nameEN}
</ProText> </ProText>
{item.description && ( {item.description && (
<ProText <ProText
@@ -124,7 +124,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
letterSpacing: "0%", letterSpacing: "0%",
}} }}
> >
{item.description} {isRTL ? item.descriptionAR : item.descriptionEN}
</ProText> </ProText>
)} )}

View File

@@ -576,12 +576,15 @@ export interface Product {
isHasLoyalty: boolean; isHasLoyalty: boolean;
name: string; name: string;
nameOther: string; nameOther: string;
nameAR: string;
nameEN: string;
price: number; price: number;
pricing_method: string; pricing_method: string;
original_price: number; original_price: number;
preperation_minutes: number; preperation_minutes: number;
description: string; description: string;
descriptionAR: string; descriptionAR: string;
descriptionEN: string;
image: string; image: string;
imageNew: string; imageNew: string;
image_small: string; image_small: string;