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

Function handleThemeChange

src/components/ThemeSwitch.tsx:8–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 const theme = settingStore.setting.theme;
7
8 const handleThemeChange = () => {
9 if (theme === "light") {
10 settingStore.setLocale("zh");
11 } else {
12 settingStore.setLocale("en");
13 }
14 };
15
16 return (
17 <button className="w-10 h-10 p-1 rounded-full flex flex-row justify-center items-center hover:bg-gray-100" onClick={handleThemeChange}>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected