"use client"; import { useState, useEffect } from "react"; import { Plus, History } from "lucide-react"; import Link from "next/link"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { fetchCredentials, type Credential } from "@/lib/api/credentials"; export default function CredentialsPage(): React.ReactElement { const [credentials, setCredentials] = useState([]); const [isLoading, setIsLoading] = useState(true); const [error, setError] = useState(null); const workspaceId = "default-workspace-id"; useEffect(() => { void loadCredentials(); }, []); async function loadCredentials(): Promise { try { setIsLoading(true); const response = await fetchCredentials(workspaceId); setCredentials(response.data); setError(null); } catch (err) { setError(err instanceof Error ? err.message : "Failed to load credentials"); } finally { setIsLoading(false); } } return (
{/* Header */}

Credentials

Securely store and manage API keys, tokens, and passwords

{/* Error Display */} {error &&
{error}
} {/* Loading State */} {isLoading ? (

Loading credentials...

) : credentials.length === 0 ? (

No credentials found

) : (

Credentials feature coming soon.

)}
); }