diff --git a/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx b/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx index 2c989f2..6559a94 100644 --- a/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx +++ b/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx @@ -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(() => { diff --git a/src/app/[name]/(Profile)/profile/address/page.tsx b/src/app/[name]/(Profile)/profile/address/page.tsx index 1e80034..ddfe5ee 100644 --- a/src/app/[name]/(Profile)/profile/address/page.tsx +++ b/src/app/[name]/(Profile)/profile/address/page.tsx @@ -15,6 +15,7 @@ import useToggle from '@/hooks/helpers/useToggle'; type Props = object function UserAddressesPage({ }: Props) { + const { data: addressesResponse, isLoading } = useGetAddresses(); const router = useRouter(); const searchParams = useSearchParams(); @@ -101,7 +102,7 @@ function UserAddressesPage({ }: Props) { addresses.map((address) => (