Compare commits
1 Commits
615bc80c79
...
1666b15268
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1666b15268 |
@ -30,16 +30,10 @@ 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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user