mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-14 10:24:30 +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;
|
version?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function HeroSection({ version = '5.0.0' }: HeroSectionProps) {
|
export function HeroSection({ version }: HeroSectionProps) {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<CcsLogo size="lg" showText={false} />
|
<CcsLogo size="lg" showText={false} />
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<h1 className="text-2xl font-bold">CCS Config</h1>
|
<h1 className="text-2xl font-bold">CCS Config</h1>
|
||||||
<Badge variant="outline" className="font-mono text-xs">
|
{version && (
|
||||||
v{version}
|
<Badge variant="outline" className="font-mono text-xs">
|
||||||
</Badge>
|
v{version}
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-muted-foreground text-sm mt-1">Claude Code Switch Dashboard</p>
|
<p className="text-muted-foreground text-sm mt-1">Claude Code Switch Dashboard</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user