mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: multi-subscription UI audit fixes and cache invalidation improvements
- Fix AdminUserDetail multi-subscription display with useMemo optimization - Update Dashboard subscription cards and purchase entry points - Fix WebSocket notification handlers for multi-subscription context - Update SubscriptionPurchase cache invalidation for multi-tariff mode - Fix Subscriptions list page and navigation patterns - Update App routing, DeepLinkRedirect, and CommandPalette for multi-sub - Add SubscriptionListCard component - Fix TopUpResult and PromoOffersSection navigation
This commit is contained in:
16
src/App.tsx
16
src/App.tsx
@@ -1,5 +1,5 @@
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { Routes, Route, Navigate, useLocation } from 'react-router';
|
||||
import { Routes, Route, Navigate, useLocation, useParams } from 'react-router';
|
||||
import { useAuthStore } from './store/auth';
|
||||
import { useBlockingStore } from './store/blocking';
|
||||
import Layout from './components/layout/Layout';
|
||||
@@ -191,6 +191,12 @@ function BlockingOverlay() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Redirect /subscription/:id → /subscriptions/:id preserving the param */
|
||||
function LegacySubscriptionRedirect() {
|
||||
const { subscriptionId } = useParams<{ subscriptionId: string }>();
|
||||
return <Navigate to={`/subscriptions/${subscriptionId}`} replace />;
|
||||
}
|
||||
|
||||
function App() {
|
||||
useAnalyticsCounters();
|
||||
|
||||
@@ -269,7 +275,7 @@ function App() {
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/subscription/:subscriptionId"
|
||||
path="/subscriptions/:subscriptionId"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<LazyPage>
|
||||
@@ -278,13 +284,13 @@ function App() {
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
{/* Legacy redirects for backward compatibility */}
|
||||
<Route path="/subscription/:subscriptionId" element={<LegacySubscriptionRedirect />} />
|
||||
<Route
|
||||
path="/subscription"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<LazyPage>
|
||||
<Subscription />
|
||||
</LazyPage>
|
||||
<Navigate to="/subscriptions" replace />
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user