[fix] Fix dark mode (#5008)

## Context
Fixing broken dark mode
<img width="826" alt="Capture d’écran 2024-04-17 à 15 50 39"
src="https://github.com/twentyhq/twenty/assets/51697796/94df50bd-5b43-4def-a39d-268a10ac560a">

## How was it tested
Locally
Test of dark mode on storybook is added on another PR
This commit is contained in:
Marie 2024-04-17 16:54:03 +02:00 committed by GitHub
parent 75fd430149
commit ac9ccbc2b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,6 @@
import { ErrorInfo, ReactNode } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { ThemeProvider } from '@emotion/react';
import { THEME_LIGHT } from 'twenty-ui';
import { ThemeProvider, useTheme } from '@emotion/react';
import { GenericErrorFallback } from '@/error-handler/components/GenericErrorFallback';
@ -10,8 +9,10 @@ export const AppErrorBoundary = ({ children }: { children: ReactNode }) => {
// TODO: log error to Sentry
};
const theme = useTheme();
return (
<ThemeProvider theme={THEME_LIGHT}>
<ThemeProvider theme={theme}>
<ErrorBoundary
FallbackComponent={GenericErrorFallback}
onError={handleError}