From 142a4203669e24dcb680188a9a54a61f576f1302 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Tue, 8 Apr 2025 11:25:14 +0800 Subject: [PATCH] feat:update modal --- components/landing-page/hero.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/landing-page/hero.tsx b/components/landing-page/hero.tsx index 62d59f4c..5aebe217 100644 --- a/components/landing-page/hero.tsx +++ b/components/landing-page/hero.tsx @@ -193,6 +193,15 @@ const options = { }; const SurveyFormModal = ({ onClose }: { onClose: () => void }) => { + useEffect(() => { + // Lock body scroll when modal is open + document.body.style.overflow = "hidden"; + + // Clean up when modal closes + return () => { + document.body.style.overflow = ""; + }; + }, []); return ( void }) => { if (!open) onClose(); }} > - + SURVEI KEPUASAN PENGGUNA MEDIAHUB POLRI