mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
refactor: review round 2 — remove dead code, fix type safety, improve UX
- Remove LinkOAuthCallback.tsx (dead code) and its route from App.tsx - Move LINK_OAUTH_* constants to OAuthCallback.tsx - Replace local ServerLinkResult with LinkCallbackResponse from types - Move merge navigate() from render body to useEffect - Track errorMode to show correct CTA (Return to Telegram vs Back to Login) - Remove non-null assertions with proper narrowing - Extract getErrorDetail helper for error casting - Add smart polling success detection (stop + toast when linked count increases)
This commit is contained in:
11
src/App.tsx
11
src/App.tsx
@@ -40,7 +40,6 @@ const ConnectionQR = lazy(() => import('./pages/ConnectionQR'));
|
||||
const TopUpMethodSelect = lazy(() => import('./pages/TopUpMethodSelect'));
|
||||
const TopUpAmount = lazy(() => import('./pages/TopUpAmount'));
|
||||
const ConnectedAccounts = lazy(() => import('./pages/ConnectedAccounts'));
|
||||
const LinkOAuthCallback = lazy(() => import('./pages/LinkOAuthCallback'));
|
||||
const LinkTelegramCallback = lazy(() => import('./pages/LinkTelegramCallback'));
|
||||
const MergeAccounts = lazy(() => import('./pages/MergeAccounts'));
|
||||
|
||||
@@ -317,16 +316,6 @@ function App() {
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/auth/link/callback"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<LazyPage>
|
||||
<LinkOAuthCallback />
|
||||
</LazyPage>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/auth/link/telegram/callback"
|
||||
element={
|
||||
|
||||
Reference in New Issue
Block a user