Compare commits

..

2 Commits

View File

@ -30,10 +30,16 @@ function App() {
const setTheme = (theme: string) => {
_setTheme(theme);
localStorage.setItem("theme", theme);
bc.postMessage(theme);
};
const [toasts, setToasts] = useState<ToastMessage[]>([]);
const [isLoading, setIsLoading] = useState(false);
const bc = new BroadcastChannel("theme-channel");
bc.onmessage = (ev) => {
_setTheme(ev.data as string);
};
useEffect(() => {
if (theme !== "default" && theme !== "sakura") {
document.body.classList.remove("sakura-theme");