From fbd89f0bc39c2a11feb2a3a7d2ab17b83201a779 Mon Sep 17 00:00:00 2001 From: Rishikesh Maddhesiya Date: Mon, 5 May 2025 01:58:27 +0530 Subject: [PATCH 1/2] made privacy policy and legal notice responsive --- src/components/LegalNotice/index.tsx | 8 ++++---- src/components/Privacy/index.tsx | 29 ++++++++++++++++++++-------- src/styles/index.css | 4 +++- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/components/LegalNotice/index.tsx b/src/components/LegalNotice/index.tsx index 546ea93..ba8f7cc 100644 --- a/src/components/LegalNotice/index.tsx +++ b/src/components/LegalNotice/index.tsx @@ -12,8 +12,8 @@ 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..9e8ded8 100644 --- a/src/components/Privacy/index.tsx +++ b/src/components/Privacy/index.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; +import { useEffect } from "react"; interface PrivacyPolicyPopupProps { isOpen: boolean; @@ -9,30 +10,42 @@ 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 +} + + From 7da490a740e8c7e881d11d023394d233656054a1 Mon Sep 17 00:00:00 2001 From: Rishikesh Maddhesiya Date: Mon, 5 May 2025 02:36:51 +0530 Subject: [PATCH 2/2] made privacy policy and legal notice responsive --- src/components/LegalNotice/index.tsx | 6 +++--- src/components/Privacy/index.tsx | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/LegalNotice/index.tsx b/src/components/LegalNotice/index.tsx index ba8f7cc..9f9bcf3 100644 --- a/src/components/LegalNotice/index.tsx +++ b/src/components/LegalNotice/index.tsx @@ -12,12 +12,12 @@ const LegalNoticePopup: React.FC = ({ if (!isOpen) return null; // Prevent rendering when not open return ( -

-
+
+
{/* Fixed Close Button */}