set address as default

This commit is contained in:
hamid zarghami
2025-12-01 15:23:26 +03:30
parent 4f5409f79a
commit 89e9a8c057
3 changed files with 5 additions and 3 deletions
@@ -4,6 +4,7 @@ import React from 'react';
import Link from 'next/link';
import Button from '@/components/button/PrimaryButton';
import { useGetFoods } from '@/app/[name]/(Main)/hooks/useMenuData';
import type { Food } from '@/app/[name]/(Main)/types/Types';
import { useCart } from '../hook/useCart';
import { useTranslation } from 'react-i18next';
import { Add, Minus } from 'iconsax-react';
@@ -26,7 +27,7 @@ const CartSummary = ({ description = '', onDescriptionChange }: CartSummaryProps
.map(([id]) =>
foods.find((foodItem) => String(foodItem.id) === String(id))
)
.filter((food) => Boolean(food));
.filter((food): food is Food => Boolean(food));
}, [foods, items]);
const totalPrice = React.useMemo(() => {