mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
refactor(routing): drop now-redundant per-route ErrorBoundary wrappers
Six routes were wrapped in <ErrorBoundary level='app'> around LazyPage. After the previous commit moved a level='page' boundary inside LazyPage, the outer 'app' boundary became unreachable — the inner one catches first. Strip the dead wrappers (PurchaseSuccess, QuickPurchase, AutoLogin, TopUpResult, GiftSubscription, GiftResult). Behavior is identical, the route blocks are 25 fewer lines, and there's only one boundary to reason about per route.
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -271,31 +271,25 @@ function App() {
|
||||
<Route
|
||||
path="/buy/success/:token"
|
||||
element={
|
||||
<ErrorBoundary level="app">
|
||||
<LazyPage>
|
||||
<PurchaseSuccess />
|
||||
</LazyPage>
|
||||
</ErrorBoundary>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/buy/:slug"
|
||||
element={
|
||||
<ErrorBoundary level="app">
|
||||
<LazyPage>
|
||||
<QuickPurchase />
|
||||
</LazyPage>
|
||||
</ErrorBoundary>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/auto-login"
|
||||
element={
|
||||
<ErrorBoundary level="app">
|
||||
<LazyPage>
|
||||
<AutoLogin />
|
||||
</LazyPage>
|
||||
</ErrorBoundary>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -394,11 +388,9 @@ function App() {
|
||||
path="/balance/top-up/result"
|
||||
element={
|
||||
<ProtectedRoute withLayout={false}>
|
||||
<ErrorBoundary level="app">
|
||||
<LazyPage>
|
||||
<TopUpResult />
|
||||
</LazyPage>
|
||||
</ErrorBoundary>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
@@ -525,25 +517,21 @@ function App() {
|
||||
<Route
|
||||
path="/gift"
|
||||
element={
|
||||
<ErrorBoundary level="app">
|
||||
<ProtectedRoute>
|
||||
<LazyPage>
|
||||
<GiftSubscription />
|
||||
</LazyPage>
|
||||
</ProtectedRoute>
|
||||
</ErrorBoundary>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/gift/result"
|
||||
element={
|
||||
<ErrorBoundary level="app">
|
||||
<ProtectedRoute>
|
||||
<LazyPage>
|
||||
<GiftResult />
|
||||
</LazyPage>
|
||||
</ProtectedRoute>
|
||||
</ErrorBoundary>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
|
||||
Reference in New Issue
Block a user