feat: rewrite auth (#364)
* feat: wip rewrite auth * feat: restructure folders and fix stories and tests * feat: remove auth provider and fix tests
This commit is contained in:
14
front/src/providers/theme/AppThemeProvider.tsx
Normal file
14
front/src/providers/theme/AppThemeProvider.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
|
||||
import { darkTheme, lightTheme } from '@/ui/layout/styles/themes';
|
||||
import { browserPrefersDarkMode } from '@/utils/utils';
|
||||
|
||||
type OwnProps = {
|
||||
children: JSX.Element;
|
||||
};
|
||||
|
||||
export function AppThemeProvider({ children }: OwnProps) {
|
||||
const selectedTheme = browserPrefersDarkMode() ? darkTheme : lightTheme;
|
||||
|
||||
return <ThemeProvider theme={selectedTheme}>{children}</ThemeProvider>;
|
||||
}
|
||||
Reference in New Issue
Block a user