diff --git a/app/(site)/(directories)/tld-directory/content/types.mdx b/app/(site)/(directories)/tld-directory/content/types.mdx index 82d9ce1f..c605a3d4 100644 --- a/app/(site)/(directories)/tld-directory/content/types.mdx +++ b/app/(site)/(directories)/tld-directory/content/types.mdx @@ -1,11 +1,9 @@ ## What do the domain extension types mean? -The type is IANA's label for how an ending is run, and it hints at who can register under it. +The type is IANA's label for an ending. Generic endings can still restrict who can register, as `.edu` and `.gov` do. | Type | What it is | | --- | --- | -| generic | Most endings, such as `.com` and `.xyz`. Most arrived from 2013 on, through ICANN's New gTLD Program. Brand endings, such as `.bmw`, are used only by their owner. | +| generic | Endings such as `.com`, `.xyz`, `.edu`, `.gov`, `.biz`, and `.pro`. Brand endings, such as `.bmw`, are used only by their owner. | | country-code | Two-letter endings for a country or territory, such as `.uk`, plus versions in other scripts, such as `.中国`, shown with their `xn--` form. Each sets its own rules. | -| sponsored | Endings for one community, such as `.edu` and `.gov`, often with eligibility rules. | -| generic-restricted | Older generic endings that launched with limits on who could register, such as `.biz` and `.pro`. | | infrastructure | `.arpa`, used for reverse DNS. You can't register a name under it. | diff --git a/app/(site)/(directories)/tld-directory/tld-table.tsx b/app/(site)/(directories)/tld-directory/tld-table.tsx index 0324d29b..c163c0c7 100644 --- a/app/(site)/(directories)/tld-directory/tld-table.tsx +++ b/app/(site)/(directories)/tld-directory/tld-table.tsx @@ -14,7 +14,6 @@ export type TldRow = { isIdn: boolean; }; -const TYPES = ["generic", "country-code", "sponsored", "infrastructure", "generic-restricted", "test"]; const PAGE_SIZE = 100; export function TldTable({ rows }: { rows: TldRow[] }) { @@ -24,6 +23,11 @@ export function TldTable({ rows }: { rows: TldRow[] }) { const [dnssec, setDnssec] = useState(""); const [limit, setLimit] = useState(PAGE_SIZE); + const types = useMemo( + () => [...new Set(rows.map((row) => row.type).filter((value): value is string => Boolean(value)))].sort(), + [rows], + ); + const filtered = useMemo(() => { const needle = query.trim().toLowerCase().replace(/^\./, ""); return rows.filter((row) => { @@ -65,7 +69,7 @@ export function TldTable({ rows }: { rows: TldRow[] }) { Type