mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
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.
This commit is contained in:
@@ -5,16 +5,18 @@ interface HeroSectionProps {
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export function HeroSection({ version = '5.0.0' }: HeroSectionProps) {
|
||||
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>
|
||||
<Badge variant="outline" className="font-mono text-xs">
|
||||
v{version}
|
||||
</Badge>
|
||||
{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>
|
||||
|
||||
Reference in New Issue
Block a user