From 14da9f50105f3bde55cff2daf48b71d9fe170d6f Mon Sep 17 00:00:00 2001 From: Aryan Ramesh Jain <138214350+jainaryan04@users.noreply.github.com> Date: Thu, 31 Oct 2024 22:31:39 +0530 Subject: [PATCH] initial #469: add hook and toggle --- frontend/src/Pages/Herosection.jsx | 4 +++- frontend/src/components/ThemeToggle.jsx | 32 +++++++++++++++++++++++++ frontend/src/hooks/useDarkMode.js | 16 +++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/ThemeToggle.jsx create mode 100644 frontend/src/hooks/useDarkMode.js diff --git a/frontend/src/Pages/Herosection.jsx b/frontend/src/Pages/Herosection.jsx index 750dcf4..3fbc936 100644 --- a/frontend/src/Pages/Herosection.jsx +++ b/frontend/src/Pages/Herosection.jsx @@ -1,5 +1,6 @@ import React from "react"; import "./Herosection.css"; +import ThemeToggle from "../components/ThemeToggle" import logo from "../assets/stationsaarthi.svg"; import navigationsvg from "../assets/svg/navigation.svg"; import bookingsvg from "../assets/svg/bookings.svg"; @@ -56,8 +57,9 @@ const Herosection = () => { return ( <>