fix(settings): update workspace creation display logic to show reason only when creation is not allowed

This commit is contained in:
Yusuf İpek
2026-04-11 13:02:30 +03:00
parent e18d5219f5
commit d1b2d23509
@@ -401,14 +401,14 @@ export default function SettingsPage({ billingOnly = false }: { billingOnly?: bo
</p> </p>
) : null} ) : null}
<div className="rounded-lg border bg-muted/30 p-4 space-y-2"> {!billing.workspaceCreation.canCreateWorkspace ? (
<p className="text-sm font-medium">Workspace creation</p> <div className="rounded-lg border bg-muted/30 p-4 space-y-2">
<p className="text-sm text-muted-foreground"> <p className="text-sm font-medium">Workspace creation</p>
{billing.workspaceCreation.canCreateWorkspace <p className="text-sm text-muted-foreground">
? 'This account can create workspaces.' {billing.workspaceCreation.reason || 'Upgrade to create another workspace.'}
: billing.workspaceCreation.reason || 'Upgrade to create another workspace.'} </p>
</p> </div>
</div> ) : null}
<div className="flex flex-col sm:flex-row gap-3"> <div className="flex flex-col sm:flex-row gap-3">
{billing.subscription.hasActiveSubscription && billing.portalAvailable ? ( {billing.subscription.hasActiveSubscription && billing.portalAvailable ? (