Skip to content

Commit aa76790

Browse files
committed
fix: hide the tooltip if no description is provided
1 parent baa2b06 commit aa76790

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/web/src/components/tracker.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function Tracker({
7070
{
7171
count: 0,
7272
ok: 0,
73-
},
73+
}
7474
);
7575

7676
const uptime =
@@ -114,6 +114,11 @@ const MoreInfo = ({
114114
const [open, setOpen] = React.useState(false);
115115
const formattedURL = new URL(url);
116116
const link = `${formattedURL.host}${formattedURL.pathname}`;
117+
118+
if (description == null && context !== "play") {
119+
return;
120+
}
121+
117122
return (
118123
<TooltipProvider>
119124
<Tooltip open={open} onOpenChange={setOpen}>
@@ -203,7 +208,7 @@ const Bar = ({
203208

204209
// FIXME this is a temporary solution
205210
const getStatus = (
206-
ratio: number,
211+
ratio: number
207212
): { label: string; variant: "up" | "degraded" | "down" } => {
208213
if (ratio >= 0.98) return { label: "Operational", variant: "up" };
209214
if (ratio >= 0.5) return { label: "Degraded", variant: "degraded" };

0 commit comments

Comments
 (0)