"use client"; import { IconCheck, IconX } from "@tabler/icons-react"; import { Badge } from "@kandev/ui/badge"; import { Spinner } from "@kandev/ui/spinner"; import { useGitHubStatus } from "@/hooks/domains/github/use-github-status"; export function GitHubStatusCard() { const { status, loaded, loading } = useGitHubStatus(); if (loading || !loaded) { return (
Checking GitHub connection...
); } if (!status || !status.authenticated) { return (
Not connected to GitHub Run gh auth login or add a GITHUB_TOKEN secret
); } return (
Connected as {status.username} {status.auth_method === "gh_cli" ? "gh CLI" : "PAT"}
); }