Compare commits
2 Commits
abef725eb6
...
dbd3642b9a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbd3642b9a | ||
| d2a2f0ceea |
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user