diff --git a/src/components/dashboard/StatsGrid.tsx b/src/components/dashboard/StatsGrid.tsx index 64d6bb5..8c3ebbb 100644 --- a/src/components/dashboard/StatsGrid.tsx +++ b/src/components/dashboard/StatsGrid.tsx @@ -42,7 +42,7 @@ export default function StatsGrid({ refLoading, }: StatsGridProps) { const { t } = useTranslation(); - const { formatAmount, currencySymbol, formatPositive } = useCurrency(); + const { formatAmount, currencySymbol } = useCurrency(); const { isDark } = useTheme(); const g = getGlassColors(isDark); @@ -83,7 +83,7 @@ export default function StatsGrid({ label: t('dashboard.stats.referrals'), value: `${referralCount}`, valueColor: g.text, - subtitle: `${formatPositive(earningsRubles)} ${currencySymbol}`, + subtitle: `${formatAmount(earningsRubles)} ${currencySymbol}`, subtitleColor: zone.mainHex, to: '/referral', icon: (color: string) => ( diff --git a/src/components/dashboard/SubscriptionCardActive.tsx b/src/components/dashboard/SubscriptionCardActive.tsx index 099faaf..df934d7 100644 --- a/src/components/dashboard/SubscriptionCardActive.tsx +++ b/src/components/dashboard/SubscriptionCardActive.tsx @@ -240,19 +240,38 @@ export default function SubscriptionCardActive({ - {/* Device dots */} -
+ )} )} diff --git a/src/components/layout/AppShell/AppShell.tsx b/src/components/layout/AppShell/AppShell.tsx index 127d177..4a6d521 100644 --- a/src/components/layout/AppShell/AppShell.tsx +++ b/src/components/layout/AppShell/AppShell.tsx @@ -20,6 +20,7 @@ import CampaignBonusNotifier from '@/components/CampaignBonusNotifier'; import SuccessNotificationModal from '@/components/SuccessNotificationModal'; import LanguageSwitcher from '@/components/LanguageSwitcher'; import TicketNotificationBell from '@/components/TicketNotificationBell'; +import { SubscriptionIcon } from '@/components/icons'; import { MobileBottomNav } from './MobileBottomNav'; import { AppHeader } from './AppHeader'; @@ -252,6 +253,7 @@ export function AppShell({ children }: AppShellProps) { // Desktop navigation items const desktopNavItems = [ { path: '/', label: t('nav.dashboard'), icon: HomeIcon }, + { path: '/subscription', label: t('nav.subscription'), icon: SubscriptionIcon }, { path: '/balance', label: t('nav.balance'), icon: CreditCardIcon }, { path: '/support', label: t('nav.support'), icon: ChatIcon }, { path: '/info', label: t('nav.info'), icon: InfoIcon }, diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 64dd386..8da5359 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -265,7 +265,7 @@ export default function Dashboard() { balanceRubles={balanceData?.balance_rubles || 0} subscription={subscription} referralCount={referralInfo?.total_referrals || 0} - earningsRubles={referralInfo?.total_earnings_rubles || 0} + earningsRubles={referralInfo?.available_balance_rubles || 0} refLoading={refLoading} /> diff --git a/src/types/index.ts b/src/types/index.ts index bed9904..85882e7 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -423,6 +423,9 @@ export interface ReferralInfo { total_earnings_kopeks: number; total_earnings_rubles: number; commission_percent: number; + available_balance_kopeks: number; + available_balance_rubles: number; + withdrawn_kopeks: number; } export interface ReferralTerms {