forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Fix white screen when error handled by AppErrorBoundary (twenty…
…hq#5017) [In a previous PR](twentyhq#5008) I was fixing dark mode by calling useTheme in AppErrorBoundary while there was actually no parent ThemeProvider. This was causing a bug when an error was actually intercepted by AppErrorBoundary because theme was empty. Now I am providing the error theme in GenericErrorFallback, fallbacking to THEME_LIGHT as it can be called from outside a ThemeProvider (as it is the case today), but also reading into ThemeProvider in case we end up using this component in a part of the application where it is available, not to necessarily use THEME_LIGHT. ## How was it tested? with @thaisguigon Locally (dark mode works + error mode works (throwing an error in RecoilDebugObserver))
- Loading branch information
Showing
2 changed files
with
29 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters