diff --git a/packages/twenty-front/src/modules/error-handler/components/AppErrorBoundary.tsx b/packages/twenty-front/src/modules/error-handler/components/AppErrorBoundary.tsx index 8f38b9e8e..ecd37e8e2 100644 --- a/packages/twenty-front/src/modules/error-handler/components/AppErrorBoundary.tsx +++ b/packages/twenty-front/src/modules/error-handler/components/AppErrorBoundary.tsx @@ -1,6 +1,5 @@ import { ErrorInfo, ReactNode } from 'react'; import { ErrorBoundary } from 'react-error-boundary'; -import { ThemeProvider, useTheme } from '@emotion/react'; import { GenericErrorFallback } from '@/error-handler/components/GenericErrorFallback'; @@ -9,16 +8,12 @@ export const AppErrorBoundary = ({ children }: { children: ReactNode }) => { // TODO: log error to Sentry }; - const theme = useTheme(); - return ( - - - {children} - - + + {children} + ); }; diff --git a/packages/twenty-front/src/modules/error-handler/components/GenericErrorFallback.tsx b/packages/twenty-front/src/modules/error-handler/components/GenericErrorFallback.tsx index 73b9a64c6..87f840369 100644 --- a/packages/twenty-front/src/modules/error-handler/components/GenericErrorFallback.tsx +++ b/packages/twenty-front/src/modules/error-handler/components/GenericErrorFallback.tsx @@ -1,5 +1,7 @@ import { FallbackProps } from 'react-error-boundary'; -import { IconRefresh } from 'twenty-ui'; +import { ThemeProvider, useTheme } from '@emotion/react'; +import isEmpty from 'lodash.isempty'; +import { IconRefresh, THEME_LIGHT } from 'twenty-ui'; import { Button } from '@/ui/input/button/components/Button'; import AnimatedPlaceholder from '@/ui/layout/animated-placeholder/components/AnimatedPlaceholder'; @@ -16,23 +18,26 @@ export const GenericErrorFallback = ({ error, resetErrorBoundary, }: GenericErrorFallbackProps) => { + const theme = useTheme(); return ( - - - - - Server’s on a coffee break - - - {error.message} - - -