mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
feat(phone/error-handling): add top level error boundary for reload
This commit is contained in:
1 parent
908a393451
commit
3b7326dac8
3 files changed
+88
-16
No files matched your search
+19
-16
@@ -32,6 +32,7 @@ import PhoneWrapper from './PhoneWrapper';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import DefaultConfig from '../../config.json';
|
||||
import { TopLevelErrorComponent } from './ui/components/TopLevelErrorComponent';
|
||||
|
||||
function Phone() {
|
||||
const { t, i18n } = useTranslation();
|
||||
@@ -78,22 +79,24 @@ function Phone() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<WindowSnackbar />
|
||||
<PhoneWrapper>
|
||||
<NotificationBar />
|
||||
<div className="PhoneAppContainer">
|
||||
<>
|
||||
<Route exact path="/" component={HomeApp} />
|
||||
{callModal && <Route exact path="/call" component={CallModal} />}
|
||||
{apps.map((App) => (
|
||||
<App.Route key={App.id} />
|
||||
))}
|
||||
</>
|
||||
<NotificationAlert />
|
||||
<PhoneSnackbar />
|
||||
</div>
|
||||
<Navigation />
|
||||
</PhoneWrapper>
|
||||
<TopLevelErrorComponent>
|
||||
<WindowSnackbar />
|
||||
<PhoneWrapper>
|
||||
<NotificationBar />
|
||||
<div className="PhoneAppContainer">
|
||||
<>
|
||||
<Route exact path="/" component={HomeApp} />
|
||||
{callModal && <Route exact path="/call" component={CallModal} />}
|
||||
{apps.map((App) => (
|
||||
<App.Route key={App.id} />
|
||||
))}
|
||||
</>
|
||||
<NotificationAlert />
|
||||
<PhoneSnackbar />
|
||||
</div>
|
||||
<Navigation />
|
||||
</PhoneWrapper>
|
||||
</TopLevelErrorComponent>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user