mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-11 12:09:03 +00:00
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.
26 lines
730 B
TypeScript
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>
|
|
);
|
|
}
|