fix(dashboard): Add global errorElement (#10981)
Resolves CMRC-627 **What** - If the session expired, and the user then navigated to a route with no loader the request for the user info in the sidebar would fail causing the app to crash as we didn't have an errorElement wrapping the app shell. - This PR adds a top level errorElement which handles errors that are outside of a page context, such as in the sidebar.
This commit is contained in:
committed by
GitHub
parent
7feb004600
commit
0bef3202f3
5
.changeset/tasty-plums-tan.md
Normal file
5
.changeset/tasty-plums-tan.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/dashboard": patch
|
||||
---
|
||||
|
||||
fix(dashboard): Add global errorElement
|
||||
@@ -12,10 +12,10 @@ import { taxRegionLoader } from "../../routes/tax-regions/tax-region-detail/load
|
||||
import { RouteExtensions } from "./route-extensions"
|
||||
import { SettingsExtensions } from "./settings-extensions"
|
||||
|
||||
// TODO: Add translations for all breadcrumbs
|
||||
export const RouteMap: RouteObject[] = [
|
||||
{
|
||||
element: <ProtectedRoute />,
|
||||
errorElement: <ErrorBoundary />,
|
||||
children: [
|
||||
{
|
||||
element: <MainLayout />,
|
||||
|
||||
Reference in New Issue
Block a user