From 53094382925089da2c7c4d70b7ae49bb146f86d5 Mon Sep 17 00:00:00 2001 From: varsha-user Date: Tue, 2 Dec 2025 15:05:13 +0530 Subject: [PATCH] On clicking the 'No Thanks' button in the Stay Updated block, at the bottom of the user page, that block wouldn't close. So I made changes in the NewsletterSubscriptions.jsx to make it collapses when 'No Thanks' is clicked. --- user/src/components/NewsletterSubscription.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/user/src/components/NewsletterSubscription.jsx b/user/src/components/NewsletterSubscription.jsx index 0e02f8e..5a8d41d 100644 --- a/user/src/components/NewsletterSubscription.jsx +++ b/user/src/components/NewsletterSubscription.jsx @@ -8,7 +8,7 @@ const NewsletterSubscription = () => { const [loading, setLoading] = useState(false); const [message, setMessage] = useState(null); const [messageType, setMessageType] = useState(null); - + const [isVisible, setIsVisible] = useState(true); // Demo mode flag - set to true for testing without backend const DEMO_MODE = true; @@ -88,8 +88,13 @@ const NewsletterSubscription = () => { const handleNoThanks = () => { setEmail(''); setMessage(null); + setIsVisible(false); }; + if (!isVisible) { + return null; + } + return (