From 71c2391b998a2b4f870d2dad2bd878211c70dfec Mon Sep 17 00:00:00 2001 From: lerte smith Date: Mon, 15 Apr 2024 21:15:58 +0800 Subject: [PATCH] fixed --- frontend/src/App.tsx | 5 ++++- frontend/src/Zroker.tsx | 15 ++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index a0897ca..3e9b2e0 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -23,7 +23,10 @@ const App = () => { accentColor="crimson" > - + void }) => { +const Zroker = ({ + theme, + setTheme, +}: { + theme: Theme; + setTheme: (theme: Theme) => void; +}) => { const { enable } = useEnable(); return ( @@ -17,9 +22,9 @@ const Zroker = ({ setTheme }: { setTheme: (theme: Theme) => void }) => { size="4" radius="full" variant="ghost" - onClick={() => setTheme(isDark() ? "light" : "dark")} + onClick={() => setTheme(theme == "dark" ? "light" : "dark")} > - {isDark() ? : } + {theme == "dark" ? : }