diff --git a/client/public/index.html b/client/public/index.html index cdbe62d5..bb80fadb 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -138,6 +138,8 @@ }); + + diff --git a/client/src/App.js b/client/src/App.js index 20918ed0..ce7ab7ce 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -39,18 +39,6 @@ function App() { backgroundColor: darkMode ? '#333' : '#f4f4f4', }; - // Optionally, fetch user data if logged in - const [user, setUser] = useState(null); - - useEffect(() => { - fetch('http://localhost:5000/auth/current_user', { - credentials: 'include', - }) - .then(response => response.json()) - .then(data => setUser(data)) - .catch(err => console.error(err)); - }, []); - return (
@@ -75,7 +63,7 @@ function App() { } /> {/* Fallback route */} -
+
{/* Pass darkMode prop here */} {/* Ensure Preloader is correctly styled */} {/* Added GoToTop component */}
diff --git a/client/src/Components/Footer/Footer.jsx b/client/src/Components/Footer/Footer.jsx index 218e22b7..f2eafe64 100644 --- a/client/src/Components/Footer/Footer.jsx +++ b/client/src/Components/Footer/Footer.jsx @@ -2,9 +2,9 @@ import React, { useState } from 'react'; import { Link } from "react-router-dom"; import { GitHub, LinkedIn, Instagram } from '@mui/icons-material'; import XIcon from '@mui/icons-material/X'; -import './Footer.css'; +import './Footer.css'; -function Footer() { +function Footer({ darkMode }) { const [email, setEmail] = useState(""); const [message, setMessage] = useState(""); @@ -14,8 +14,13 @@ function Footer() { setEmail(""); }; + const footerStyle = { + backgroundColor: darkMode ? '#1a1a1a' : '#003366', // Darker background in dark mode + color: darkMode ? '#f1f1f1' : '#ffffff' // Light text color in dark mode + }; + return ( -