import { useTheme } from "../commons/theme";

export const SwitchTheme = () => {
  const { setMode, mode } = useTheme();

  if (mode === "light") {
    return <button onClick={() => setMode("dark")}>暗色</button>;
  }
  return <button onClick={() => setMode("light")}>亮色</button>;
};
