feat(MED-100): show toast on delete

This commit is contained in:
2025-07-17 10:44:05 +03:00
parent 25b4e06b89
commit 7ccc45ce77
7 changed files with 78 additions and 10 deletions

View File

@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
import {
Card,
@@ -34,8 +35,9 @@ export default function SelectAnalysisPackage({
analysisPackage: StoreProduct
countryCode: string,
}) {
const router = useRouter();
const { t, i18n: { language } } = useTranslation();
const [isAddingToCart, setIsAddingToCart] = useState(false);
const handleSelect = async (selectedVariant: StoreProductVariant) => {
if (!selectedVariant?.id) return null
@@ -46,6 +48,7 @@ export default function SelectAnalysisPackage({
countryCode,
});
setIsAddingToCart(false);
router.push('/home/cart');
}
const titleKey = analysisPackage.title;