diff --git a/src/components/LegalNotice/index.tsx b/src/components/LegalNotice/index.tsx index 546ea93..9f9bcf3 100644 --- a/src/components/LegalNotice/index.tsx +++ b/src/components/LegalNotice/index.tsx @@ -12,20 +12,20 @@ const LegalNoticePopup: React.FC = ({ if (!isOpen) return null; // Prevent rendering when not open return ( -
-
+
+
{/* Fixed Close Button */} {/* Scrollable Content */} -
-

+
+

{`Legal Notice for DevRhylme Foundation`}

diff --git a/src/components/Privacy/index.tsx b/src/components/Privacy/index.tsx index 1f8b7d0..f8605b3 100644 --- a/src/components/Privacy/index.tsx +++ b/src/components/Privacy/index.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useEffect } from "react"; interface PrivacyPolicyPopupProps { isOpen: boolean; @@ -9,30 +9,41 @@ const PrivacyPolicyPopup: React.FC = ({ isOpen, onClose, }) => { - if (!isOpen) return null; // Prevent rendering when not open + useEffect(() => { + if (isOpen) { + document.body.style.overflow = "hidden"; + } else { + document.body.style.overflow = ""; + } + return () => { + document.body.style.overflow = ""; + }; + }, [isOpen]); + + if (!isOpen) return null;// Prevent rendering when not open return ( -
-
+
+
{/* Fixed Close Button */} {/* Scrollable Content */} -
-

+
+

{`Privacy Policy for DevRhylme Foundation`}

-

+

{`Introduction`}

-

+

{`Welcome to Devrhylme.org ("we," "our," or "us"). Your privacy is of paramount importance to us. This Privacy Policy outlines the types of information we collect, how we use it, and the steps we take to diff --git a/src/styles/index.css b/src/styles/index.css index 14a8e6f..3e82e97 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -86,4 +86,6 @@ body { 50% { transform: scale(1.005); } -} \ No newline at end of file +} + +