diff --git a/pages/content-ui/src/App.tsx b/pages/content-ui/src/App.tsx index bdc6a6d..a68f553 100644 --- a/pages/content-ui/src/App.tsx +++ b/pages/content-ui/src/App.tsx @@ -1,7 +1,4 @@ import { availableApps } from '@extension/shared/lib/constants/apps'; - -// import { useEffect } from 'react'; -// import { Button } from '@extension/ui'; import { useStorage } from '@extension/shared'; import { zenStorage, ZenTimerState } from '@extension/storage'; import { useEffect, useMemo } from 'react'; @@ -22,5 +19,18 @@ export default function App() { return zenSettings?.timerState === ZenTimerState.Focus && zenSettings?.blockedApps.includes(currentAppName); }, [zenSettings]); + useEffect(() => { + if (shouldBlock) { + document.documentElement.style.setProperty('overflow', 'hidden', 'important'); + } else { + document.documentElement.style.setProperty('overflow', 'auto', 'important'); + } + + // Cleanup when component unmounts + return () => { + document.documentElement.style.setProperty('overflow', 'auto', 'important'); + }; + }, [shouldBlock]); + return
{shouldBlock && }
; } diff --git a/pages/content-ui/src/BlockView.tsx b/pages/content-ui/src/BlockView.tsx index 3a10bee..cb8d710 100644 --- a/pages/content-ui/src/BlockView.tsx +++ b/pages/content-ui/src/BlockView.tsx @@ -1,13 +1,13 @@ -import lotusIcon from './public/lotus-icon.png'; -import blockViewImage from './public/block-view.png'; +import lotusIcon from '../public/lotus-icon.png'; +import blockViewImage from '../public/block-view.png'; const BlockView = () => { return ( -
+
{/* Banner */} -
- ZenCycle Logo - This site is blocked by ZenCycle +
+ ZenCycle Logo + This site is blocked by ZenCycle
{/* Background */} @@ -22,7 +22,7 @@ const BlockView = () => { /> {/* Text Box */} -
+
{ }} />
-

REGAIN YOUR FOCUS

-
-

REGAIN YOUR LIFE

+

REGAIN YOUR FOCUS

+
+

REGAIN YOUR LIFE

diff --git a/pages/content-ui/src/index.css b/pages/content-ui/src/index.css index 59ae58e..586c76c 100644 --- a/pages/content-ui/src/index.css +++ b/pages/content-ui/src/index.css @@ -5,7 +5,7 @@ html, body, #app-container { - width: 700px; + /* width: 700px; */ margin: 0; padding: 0; overflow: none;