import type { ReactNode } from "react";
import { DateTimeFormat, T } from "src/locale";
interface Props {
	domains: string[];
	createdOn?: string;
	niceName?: string;
}
const DomainLink = ({ domain }: { domain: string }) => {
	// when domain contains a wildcard, make the link go nowhere.
	let onClick: ((e: React.MouseEvent) => void) | undefined;
	if (domain.includes("*")) {
		onClick = (e: React.MouseEvent) => e.preventDefault();
	}
	return (
		
			{domain}
		
	);
};
export function DomainsFormatter({ domains, createdOn, niceName }: Props) {
	const elms: ReactNode[] = [];
	if (domains.length === 0 && !niceName) {
		elms.push(
			
				Unknown
			,
		);
	}
	if (niceName) {
		elms.push(
			
				{niceName}
			,
		);
	}
	domains.map((domain: string) => elms.push(