Replace all team_id/team_admin references with account_id/owner across types, store, hooks, API clients, components, and pages. Add new AccountSettingsPage, UpgradePrompt, CheckoutButton, useSubscription hook, and accounts API client. AuthStore now parallel-fetches account and subscription data alongside user profile. Also fix folder sidebar not refreshing after tree deletion by dispatching the folder-changed event in handleDeleteTree. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
581 B
TypeScript
25 lines
581 B
TypeScript
import { cn } from '@/lib/utils'
|
|
|
|
interface CheckoutButtonProps {
|
|
plan: 'pro' | 'team'
|
|
className?: string
|
|
}
|
|
|
|
export function CheckoutButton({ plan, className }: CheckoutButtonProps) {
|
|
const planLabels = { pro: 'Pro', team: 'Team' }
|
|
|
|
return (
|
|
<button
|
|
disabled
|
|
title="Billing coming soon"
|
|
className={cn(
|
|
'rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground',
|
|
'disabled:opacity-50 disabled:cursor-not-allowed',
|
|
className
|
|
)}
|
|
>
|
|
Upgrade to {planLabels[plan]} (Coming Soon)
|
|
</button>
|
|
)
|
|
}
|