Set theme initially so that the gneerated JS code knows the correct theme already (#3193)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/3196/head
parent
4a74abcb34
commit
fbc4eb5457
|
@ -34,7 +34,7 @@ export default function useTheme(theme?: Maybe<string>) {
|
||||||
const embedTheme = useEmbedTheme();
|
const embedTheme = useEmbedTheme();
|
||||||
// Embed UI configuration takes more precedence over App Configuration
|
// Embed UI configuration takes more precedence over App Configuration
|
||||||
theme = embedTheme || theme;
|
theme = embedTheme || theme;
|
||||||
const [_theme, setTheme] = useState<Maybe<string>>(null);
|
const [_theme, setTheme] = useState<Maybe<string>>(theme);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// TODO: isReady doesn't seem required now. This is also impacting PSI Score for pages which are using isReady.
|
// TODO: isReady doesn't seem required now. This is also impacting PSI Score for pages which are using isReady.
|
||||||
setIsReady(true);
|
setIsReady(true);
|
||||||
|
|
Loading…
Reference in New Issue