From fea54e947ed1c7a587dc6f1beb85c83d78a0d6a1 Mon Sep 17 00:00:00 2001 From: Aryan Ramesh Jain <138214350+jainaryan04@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:05:19 +0530 Subject: [PATCH] implements #469 for landing page --- frontend/src/Pages/Herosection.jsx | 52 +++++++++++++++--------------- frontend/src/Pages/hamburger.jsx | 5 +-- frontend/src/components/navbar.jsx | 2 +- frontend/src/components/popup.jsx | 16 ++++----- frontend/src/hooks/useDarkMode.js | 2 ++ frontend/tailwind.config.js | 7 ++-- 6 files changed, 44 insertions(+), 40 deletions(-) diff --git a/frontend/src/Pages/Herosection.jsx b/frontend/src/Pages/Herosection.jsx index 3fbc936..a6e72a0 100644 --- a/frontend/src/Pages/Herosection.jsx +++ b/frontend/src/Pages/Herosection.jsx @@ -57,7 +57,7 @@ const Herosection = () => { return ( <>
+
By signing in, I agree to Station Saarthi's{' '} Terms of Service and{' '} Privacy Policy. diff --git a/frontend/src/hooks/useDarkMode.js b/frontend/src/hooks/useDarkMode.js index 1513686..b391abf 100644 --- a/frontend/src/hooks/useDarkMode.js +++ b/frontend/src/hooks/useDarkMode.js @@ -7,8 +7,10 @@ const useDarkMode = () => { const root = document.documentElement; const isDark = theme === 'dark'; root.classList.toggle('dark', isDark); + console.log(`Theme set to ${theme}, dark mode is ${isDark ? 'enabled' : 'disabled'}`); localStorage.setItem('theme', theme); }, [theme]); + return [theme, setTheme]; }; diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 6bdcac8..52339c9 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -1,9 +1,10 @@ /** @type {import('tailwindcss').Config} */ export default { content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], + darkMode: 'class', theme: { - extend: {}, + extend: { + }, }, plugins: [], -} - +};