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.
1.0 kB ยท 34 lines
TSX
1234567891011121314151617181920212223242526272829303132333435import { ArrowUpRight, ChevronRight } from "@openstatus/icons";
import { Link } from "@/components/common/link";import { cn } from "@/lib/utils";
export function TableCellLink({ value, className, ...props}: React.ComponentProps<typeof Link> & { value: unknown;}) { if (typeof value === "string") { const isExternal = props.href?.toString().startsWith("http"); const externalProps = isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {}; const Icon = isExternal ? ArrowUpRight : ChevronRight; return ( <Link className={cn( "group/link flex w-full items-center justify-between gap-2 rounded-lg hover:underline", className, )} {...externalProps} {...props} > <span className="truncate">{value}</span> <Icon className="text-muted-foreground group-hover/link:text-foreground size-4 flex-shrink-0" /> </Link> ); } return <div className="text-muted-foreground">-</div>;}