diff --git a/app/archive/page.tsx b/app/archive/page.tsx index 7cfffbc..1f25497 100644 --- a/app/archive/page.tsx +++ b/app/archive/page.tsx @@ -4,7 +4,7 @@ import ArchiveBrowser from '@/components/ArchiveBrowser'; export default function ArchivePage() { return ( -
Archive puzzles are not included in your statistics.
+ )}{stats.gamesPlayed}
diff --git a/components/LegalModals.tsx b/components/LegalModals.tsx index fb75e5c..6bcd2da 100644 --- a/components/LegalModals.tsx +++ b/components/LegalModals.tsx @@ -1,11 +1,19 @@ 'use client'; -import { useState } from 'react'; +import { useState, useEffect } from 'react'; export default function LegalModals() { const [showPrivacyPolicy, setShowPrivacyPolicy] = useState(false); const [showTermsOfService, setShowTermsOfService] = useState(false); + // Lock background scroll while any legal modal is open + useEffect(() => { + if (showPrivacyPolicy || showTermsOfService) { + document.body.style.overflow = 'hidden'; + return () => { document.body.style.overflow = ''; }; + } + }, [showPrivacyPolicy, showTermsOfService]); + return ( <> {/* Legal Section Buttons */} @@ -28,8 +36,8 @@ export default function LegalModals() { {/* Privacy Policy Modal */} {showPrivacyPolicy && ( -