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

Function ThreeDotsLoader

src/components/ConversationView/ThreeDotsLoader.tsx:5–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { useSettingStore } from "@/store";
4
5const ThreeDotsLoader = () => {
6 const settingStore = useSettingStore();
7 const [color, setColor] = useState("gray");
8
9 useEffect(() => {
10 const theme = settingStore.setting.theme;
11 let appearance = theme;
12 if (theme === "system") {
13 if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
14 appearance = "dark";
15 } else {
16 appearance = "light";
17 }
18 }
19
20 if (appearance === "dark") {
21 setColor("white");
22 } else {
23 setColor("gray");
24 }
25 }, [settingStore.setting.theme]);
26
27 return <ThreeDots wrapperClass="dark:opacity-60" width="24" height="24" color={color} />;
28};
29
30export default ThreeDotsLoader;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected