Fix ColorPicker not showing up and Auto theme not working (#7626)
This commit is contained in:
1 parent
2305b926cd
commit
95c1c81b3b
3 files changed
+16
-7
No files matched your search
@@ -6,12 +6,10 @@ import type { Maybe } from "@calcom/trpc/server";
|
||||
|
||||
// makes sure the ui doesn't flash
|
||||
export default function useTheme(theme?: Maybe<string>) {
|
||||
let currentTheme: Maybe<string> = theme || "system";
|
||||
|
||||
const { resolvedTheme, setTheme, forcedTheme, theme: activeTheme } = useNextTheme();
|
||||
const embedTheme = useEmbedTheme();
|
||||
// Embed UI configuration takes more precedence over App Configuration
|
||||
currentTheme = embedTheme || theme;
|
||||
const currentTheme = embedTheme || theme || "system";
|
||||
|
||||
useEffect(() => {
|
||||
if (currentTheme !== activeTheme && typeof currentTheme === "string") {
|
||||
|
||||
Reference in new issue
Block a user