Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ function ThemeProvider({children, theme: staticThemePreference}: ThemeProviderPr
const theme = useMemo(() => themes[debouncedTheme], [debouncedTheme]);

useEffect(() => {
/*
* For static themes we don't want to apply the autofill input style globally
* SignInPageLayout uses static theme and handles this differently.
*/
if (staticThemePreference) {
return;
}
DomUtils.addCSS(DomUtils.getAutofilledInputStyle(theme.text), 'autofill-input');

// staticThemePreference as it is a property that does not change we don't need it in the dependency array
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [theme.text]);

return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;
Expand Down