fix:theme-flakiness (#20460)
This commit is contained in:
1 parent
69548e6ed0
commit
9ce94fbbfc
2 files changed
+4
-2
No files matched your search
@@ -11,7 +11,9 @@ import { useEmbedTheme } from "@calcom/embed-core/embed-iframe";
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export default function useTheme(themeToSet: "system" | (string & {}) | undefined | null, getOnly = false) {
|
||||
themeToSet = themeToSet ? themeToSet : "system";
|
||||
if (typeof window !== "undefined") {
|
||||
themeToSet = themeToSet || localStorage.getItem("app-theme") || "system";
|
||||
}
|
||||
const { resolvedTheme, setTheme, forcedTheme, theme: activeTheme } = useNextTheme();
|
||||
const embedTheme = useEmbedTheme();
|
||||
|
||||
|
||||
Reference in new issue
Block a user