mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-25 01:04:24 +01:00
feat: new error boundary component
This commit is contained in:
@@ -13,8 +13,9 @@ import { ToastContainer } from 'react-toastify';
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
import 'react-loading-skeleton/dist/skeleton.css'
|
||||
import THEME from './theme';
|
||||
import ErrorBoundary from 'src/Components/ErrorBoundary/ErrorBoundary';
|
||||
import { NotificationsService } from 'src/services';
|
||||
import ErrorPage from 'src/Components/Errors/ErrorPage/ErrorPage';
|
||||
import { ErrorBoundary } from 'react-error-boundary';
|
||||
THEME.injectStyles();
|
||||
|
||||
let basename = '/';
|
||||
@@ -45,7 +46,9 @@ export default function Wrapper(props: any) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ErrorBoundary place='app'>
|
||||
<ErrorBoundary
|
||||
FallbackComponent={ErrorPage}
|
||||
>
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<Provider store={store}>
|
||||
<BrowserRouter basename={basename}>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import { ErrorBoundary } from 'react-error-boundary';
|
||||
import { Outlet, } from 'react-router-dom';
|
||||
import ErrorPage from 'src/Components/Errors/ErrorPage/ErrorPage';
|
||||
import Navbar from "src/Components/Navbar/Navbar";
|
||||
|
||||
export const NavbarLayout = () => {
|
||||
return <>
|
||||
<Navbar />
|
||||
<Outlet />
|
||||
<ErrorBoundary
|
||||
FallbackComponent={ErrorPage}
|
||||
>
|
||||
<Outlet />
|
||||
</ErrorBoundary>
|
||||
</>
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user