feat(MED-100): show toast on delete
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user