import type { TFunction } from "i18next"; import { formatCountOrDash } from "../lib/format"; import type { Column } from "./DataTable"; /** The shared "subscribers" DataTable column (right-aligned, sortable, em-dash for null) — identical * in the Channels manager and the ChannelDiscovery table, which show subscriber counts on different * channel row shapes. */ export function subsColumn(t: TFunction): Column { return { key: "subs", header: t("channels.cols.subs"), align: "right", nowrap: true, sortable: true, sortValue: (c) => c.subscriber_count ?? -1, render: (c) => {formatCountOrDash(c.subscriber_count)}, }; }