MCPcopy Create free account
hub / github.com/sqlchat/sqlchat / switchDarkMode

Function switchDarkMode

src/components/DarkModeSwitch.tsx:9–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 const isDarkMode = useDarkMode();
8
9 const switchDarkMode = () => {
10 if (isDarkMode) {
11 settingStore.setTheme("light");
12 } else {
13 settingStore.setTheme("dark");
14 }
15 };
16
17 const ModeIcon = isDarkMode ? Icon.IoMdMoon : Icon.IoMdSunny;
18

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected