From 5cecf7a74b3c62b0023eaeb5df590c9f9fabaebe Mon Sep 17 00:00:00 2001 From: Jarrod Norwell Date: Thu, 26 Sep 2024 03:21:32 +0800 Subject: [PATCH] Added automatic light and dark mode --- src/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index d8746e3..f0cd253 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -62,8 +62,10 @@ export default function App() { const [opened, setOpened] = useState(false); + const date = new Date(); + return ( - + = 7 && date.getHours() <= 19 ? "light" : "dark"}>