Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

24 linesCodeBlameRaw
1import { WifiOff } from "lucide-react";
2
3import { useReconnecting } from "../lib/resilient-fetch";
4
5/**
6 * Says so while the page cannot reach g1t (lib/resilient-fetch.ts): the
7 * page stays as it is and catches up once the network is back, so this
8 * only says why nothing is moving. Gone by itself when a read arrives.
9 */
10export function ConnectionToast() {
11 const reconnecting = useReconnecting();
12 if (!reconnecting) return null;
13 return (
14 <div className="pointer-events-none fixed inset-x-0 bottom-5 z-65 flex justify-center px-4 max-sm:top-[calc(env(safe-area-inset-top)+0.75rem)] max-sm:bottom-auto">
15 <p
16 role="status"
17 className="pointer-events-auto flex items-center gap-2 rounded-xl bg-surface px-3.5 py-2.5 text-sm shadow-[0_0_0_6px_var(--color-bg),0_20px_48px_-12px_rgba(0,0,0,0.9)] ring-1 ring-line-strong"
18 >
19 <WifiOff size={15} className="shrink-0 text-warn" aria-hidden />
20 <span>Can't reach g1t. Trying again…</span>
21 </p>
22 </div>
23 );
24}