refactor: extract purchase/renewal flow to separate page

Move ~1900 lines of purchase/renewal logic from Subscription.tsx into
a new SubscriptionPurchase.tsx page at /subscription/purchase.

- Create SubscriptionPurchase.tsx with tariffs grid, classic mode wizard,
  switch preview modal, and promo handling
- Create PurchaseCTAButton.tsx with animated gradient border, state-aware
  colors and context-aware text
- Create subscriptionHelpers.ts with shared utilities
- Add CopyIcon to shared icons module
- Register /subscription/purchase route with lazy loading
- Update SubscriptionCardExpired and PromoOffersSection navigators
- Add CTA translation keys to ru.json and en.json
- Remove all scrollToExtend references
This commit is contained in:
Fringg
2026-02-27 06:47:30 +03:00
parent f4d7a2cc8d
commit 126f9ab9b9
10 changed files with 2091 additions and 1942 deletions

View File

@@ -26,6 +26,7 @@ import Dashboard from './pages/Dashboard';
// User pages - lazy load
const Subscription = lazy(() => import('./pages/Subscription'));
const SubscriptionPurchase = lazy(() => import('./pages/SubscriptionPurchase'));
const Balance = lazy(() => import('./pages/Balance'));
const Referral = lazy(() => import('./pages/Referral'));
const Support = lazy(() => import('./pages/Support'));
@@ -203,6 +204,16 @@ function App() {
</ProtectedRoute>
}
/>
<Route
path="/subscription/purchase"
element={
<ProtectedRoute>
<LazyPage>
<SubscriptionPurchase />
</LazyPage>
</ProtectedRoute>
}
/>
<Route
path="/balance"
element={