+ );
+}
+
export function ApiKeyDashboard({ showCreditSuccessMessage = false }: ApiKeyDashboardProps) {
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
const isTauriDesktopPlatform = isTauriDesktop();
@@ -91,46 +105,41 @@ export function ApiKeyDashboard({ showCreditSuccessMessage = false }: ApiKeyDash
// Show loading state if billing status or API keys are loading
if (isBillingLoading || isLoading) {
return (
- <>
-
- API Management
- Loading...
-
+
+
- >
+
);
}
if (error) {
return (
- <>
-
- API Management
-
- Failed to load API keys. Please try again.
-
-
- >
+ Failed to load API keys. Please try again.
+ }
+ />
);
}
// Show upgrade prompt for users without API access (Free and Starter plans)
if (!hasApiAccess) {
return (
- <>
-
-
-
- Unlock API Access
-
-
- Upgrade to a paid plan to access powerful API features
-
-
+
+
+
+ Unlock API Access
+
+ }
+ description="Upgrade to a paid plan to access powerful API features"
+ />
-
+ {needsSetup && (
+
+
+ Set up your team
+
+ You have an active team subscription. Create your team to start inviting members.
+
+
+
+
+
+
+
+ )}
+
+ {!needsSetup && (
+
+
+
+ )}
+