From 29788df57e80d91d26c05ebc197cfc35840f5098 Mon Sep 17 00:00:00 2001 From: Mohammed Al-yaseen Date: Wed, 5 Nov 2025 19:15:02 +0300 Subject: [PATCH] product: fix "special request" save --- src/pages/cart/components/specialRequest/BottomSheet.tsx | 6 +----- src/pages/product/components/ProductFooter.tsx | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/pages/cart/components/specialRequest/BottomSheet.tsx b/src/pages/cart/components/specialRequest/BottomSheet.tsx index 49c15c7..42d544e 100644 --- a/src/pages/cart/components/specialRequest/BottomSheet.tsx +++ b/src/pages/cart/components/specialRequest/BottomSheet.tsx @@ -1,6 +1,6 @@ import { Button, Input } from "antd"; import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; const { TextArea } = Input; @@ -21,10 +21,6 @@ export function BottomSheet({ const { t } = useTranslation(); const [value, setValue] = useState(initialValue); - useEffect(() => { - setValue(initialValue); - }, [initialValue]); - const handleSave = () => { onSave(value); onClose(); diff --git a/src/pages/product/components/ProductFooter.tsx b/src/pages/product/components/ProductFooter.tsx index 2ab72c0..04143ec 100644 --- a/src/pages/product/components/ProductFooter.tsx +++ b/src/pages/product/components/ProductFooter.tsx @@ -126,11 +126,9 @@ export default function ProductFooter({ width: "100%", }} > - + - {!isDesktop && ( + {!isDesktop && isSpecialRequestOpen && (