import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { ProBottomSheet } from "../ProBottomSheet/ProBottomSheet"; import ProRatioGroups from "../ProRatioGroups/ProRatioGroups"; interface CouponBottomSheetProps { isOpen: boolean; onClose: () => void; initialValue: string; onSave: (value: string) => void; } export function CouponBottomSheet({ isOpen, onClose, initialValue, onSave, }: CouponBottomSheetProps) { const { t } = useTranslation(); const [value, setValue] = useState(initialValue); useEffect(() => { setValue(initialValue); }, [initialValue]); const handleSave = () => { onSave(value); onClose(); }; const handleCancel = () => { setValue(initialValue); onClose(); }; return (
); }