Files
ccs/ui/src/components/layout/hero-section.tsx
T
Tam Nhu Tran efe6953da0 fix(ui): hide version badge when API fails instead of showing v5.0.0
HeroSection defaulted to '5.0.0' when version prop was undefined,
causing a misleading version badge when the overview API fails (e.g.,
403 from remote access without auth). Now hides the badge entirely
until a real version is loaded.
2026-03-28 21:22:20 -04:00

26 lines
730 B
TypeScript

import { Badge } from '@/components/ui/badge';
import { CcsLogo } from '@/components/shared/ccs-logo';
interface HeroSectionProps {
version?: string;
}
export function HeroSection({ version }: HeroSectionProps) {
return (
<div className="flex items-center gap-4">
<CcsLogo size="lg" showText={false} />
<div>
<div className="flex items-center gap-3">
<h1 className="text-2xl font-bold">CCS Config</h1>
{version && (
<Badge variant="outline" className="font-mono text-xs">
v{version}
</Badge>
)}
</div>
<p className="text-muted-foreground text-sm mt-1">Claude Code Switch Dashboard</p>
</div>
</div>
);
}