Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
857 B ยท 34 lines
TSX
1234567891011121314151617181920212223242526272829303132333435import type { PrivateLocation } from "@openstatus/db/src/schema";import { getRegionInfo } from "@openstatus/regions";
import { cn } from "@/lib/utils";
export function TableCellRegion({ value, privateLocations, className, ...props}: React.ComponentProps<"div"> & { value: unknown; privateLocations?: PrivateLocation[];}) { if (typeof value !== "string" || value.length === 0) { return ( <div className={cn("text-muted-foreground", className)} {...props}> - </div> ); } const info = getRegionInfo(value, { location: privateLocations?.find((loc) => String(loc.id) === String(value)) ?.name, }); return ( <div className={cn(className)} {...props}> {info.location}{" "} <span className="text-muted-foreground/70 text-xs"> ({info.provider}) </span> </div> );}