Openstatus www.openstatus.dev

fix: hide the tooltip if no description is provided (#133)

authored by

Glenn Latomme and committed by
GitHub
f923b037 84a71456

+7 -2
+7 -2
apps/web/src/components/tracker.tsx
··· 70 70 { 71 71 count: 0, 72 72 ok: 0, 73 - }, 73 + } 74 74 ); 75 75 76 76 const uptime = ··· 114 114 const [open, setOpen] = React.useState(false); 115 115 const formattedURL = new URL(url); 116 116 const link = `${formattedURL.host}${formattedURL.pathname}`; 117 + 118 + if (description == null && context !== "play") { 119 + return; 120 + } 121 + 117 122 return ( 118 123 <TooltipProvider> 119 124 <Tooltip open={open} onOpenChange={setOpen}> ··· 203 208 204 209 // FIXME this is a temporary solution 205 210 const getStatus = ( 206 - ratio: number, 211 + ratio: number 207 212 ): { label: string; variant: "up" | "degraded" | "down" } => { 208 213 if (ratio >= 0.98) return { label: "Operational", variant: "up" }; 209 214 if (ratio >= 0.5) return { label: "Degraded", variant: "degraded" };