mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-12 18:39:19 +00:00
@@ -69,7 +69,7 @@ const ThemeProvider: FC<ThemeProviderProps> = ({ children }) => {
|
|||||||
const [previousTheme, setCurrentTheme] = useState<string | null>(
|
const [previousTheme, setCurrentTheme] = useState<string | null>(
|
||||||
document.body.classList.item(0),
|
document.body.classList.item(0),
|
||||||
);
|
);
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
// Don't update the current theme if the url does not contain a theme prop.
|
// Don't update the current theme if the url does not contain a theme prop.
|
||||||
if (!theme) return;
|
if (!theme) return;
|
||||||
const themeString = "cpd-theme-" + (theme ?? "dark");
|
const themeString = "cpd-theme-" + (theme ?? "dark");
|
||||||
|
|||||||
Reference in New Issue
Block a user