fix(ui): profile page bugs - billing button, cancel button, header subtitle
- Remove billing portal button (not functional without Stripe configured) - Show cancel subscription only when user has a real Stripe subscription ID - Remove muted subtitle from dashboard header (was appearing as grayed out) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -55,8 +55,6 @@ export function DashboardHeader() {
|
||||
{/* Page title - desktop */}
|
||||
<div className="hidden items-center gap-3 lg:flex">
|
||||
<h1 className="text-sm font-semibold text-foreground">{t('dashboard.header.title')}</h1>
|
||||
<Separator orientation="vertical" className="h-4" />
|
||||
<span className="text-sm text-muted-foreground">{t('dashboard.header.subtitle')}</span>
|
||||
</div>
|
||||
|
||||
{/* Right side */}
|
||||
|
||||
@@ -306,12 +306,6 @@ export default function ProfilePage() {
|
||||
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<Button asChild size="sm"><Link href="/pricing"><TrendingUp className="w-3.5 h-3.5 me-1.5" />{isFreePlan ? t('profile.subscription.upgradePlan') : t('profile.subscription.changePlan')}</Link></Button>
|
||||
{!isFreePlan && (
|
||||
<Button variant="outline" size="sm" onClick={handleBillingPortal} disabled={loadingPortal}>
|
||||
{loadingPortal ? <RefreshCw className="w-3.5 h-3.5 me-1.5 animate-spin" /> : <ExternalLink className="w-3.5 h-3.5 me-1.5" />}
|
||||
{t('profile.subscription.manageBilling')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -378,8 +372,8 @@ export default function ProfilePage() {
|
||||
</Card>
|
||||
)}
|
||||
|
||||
{/* Danger zone */}
|
||||
{!isFreePlan && !isCanceling && (
|
||||
{/* Danger zone - only show if user has a real Stripe subscription */}
|
||||
{!isFreePlan && !isCanceling && user?.stripe_subscription_id && (
|
||||
<Card className="border-red-900/30">
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle className="text-base flex items-center gap-2 text-red-600 dark:text-red-400">
|
||||
|
||||
Reference in New Issue
Block a user