Skip to content

Scheduling infrastructure for absolutely everyone.

Set theme initially so that the gneerated JS code knows the correct theme already (#3193)

Hariom Balharafbc4eb54575d
diff --git a/apps/web/lib/hooks/useTheme.tsx b/apps/web/lib/hooks/useTheme.tsx
index 25d6e511c13..c4a01e57f01 100644
--- a/apps/web/lib/hooks/useTheme.tsx
+++ b/apps/web/lib/hooks/useTheme.tsx
@@ -34,7 +34,7 @@ export default function useTheme(theme?: Maybe<string>) {
const embedTheme = useEmbedTheme();
// Embed UI configuration takes more precedence over App Configuration
theme = embedTheme || theme;
- const [_theme, setTheme] = useState<Maybe<string>>(null);
+ const [_theme, setTheme] = useState<Maybe<string>>(theme);
useEffect(() => {
// TODO: isReady doesn't seem required now. This is also impacting PSI Score for pages which are using isReady.
setIsReady(true);