From a111e526bfe138d64eb31e90812af2f0000fbd4b Mon Sep 17 00:00:00 2001 From: alealien666 Date: Thu, 27 Feb 2025 14:28:33 +0700 Subject: [PATCH] fe --- public/index.html | 2 +- resources/js/Components/Header.jsx | 7 +------ resources/js/Components/Layout.jsx | 18 ++++++------------ resources/js/Components/LeftSidebar.jsx | 7 +------ resources/js/Components/PageContent.jsx | 8 ++++---- .../Components/features/common/headerSlice.jsx | 8 ++++---- .../Pages/list-admin/payment/ManualPayment.jsx | 2 +- resources/js/Routes/index.jsx | 12 +++++++----- resources/js/Routes/sidebar.jsx | 10 +++++----- resources/js/app.jsx | 17 +++++++++-------- routes/web.php | 4 ++++ tailwind.config.js | 2 +- 12 files changed, 44 insertions(+), 53 deletions(-) diff --git a/public/index.html b/public/index.html index 5873f7f..e8a8f61 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ - + diff --git a/resources/js/Components/Header.jsx b/resources/js/Components/Header.jsx index 560201b..a5a841c 100644 --- a/resources/js/Components/Header.jsx +++ b/resources/js/Components/Header.jsx @@ -13,7 +13,6 @@ function Header() { const dispatch = useDispatch() const { noOfNotifications, pageTitle } = useSelector(state => state.header) - // State untuk menyimpan tema saat ini const [theme, setTheme] = useState(localStorage.getItem("theme") || (window.matchMedia('(prefers-color-scheme: dark)').matches ? "dark" : "light") ); @@ -22,9 +21,8 @@ function Header() { themeChange(false); document.documentElement.setAttribute("data-theme", theme); localStorage.setItem("theme", theme); - }, [theme]); // Setiap kali state theme berubah, update data-theme + }, [theme]); - // Fungsi untuk mengganti tema const toggleTheme = () => { setTheme(prevTheme => prevTheme === "dark" ? "light" : "dark"); } @@ -48,12 +46,10 @@ function Header() {
- {/* Light and dark theme selection toggle */} - {/* Notification icon */} - {/* Profile icon */}