export function getInitials(name: string) { return name .split(" ") .map((part) => part[0]) .filter(Boolean) .slice(0, 2) .join("") .toUpperCase(); } export function formatCreatedAt(iso: string) { return new Date(iso).toLocaleDateString("en-AU", { day: "numeric", month: "short", year: "numeric", }); } export function formatFileSize(bytes: number) { if (bytes >= 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`; if (bytes >= 1024) return `${Math.round(bytes / 1024)} KB`; return `${bytes} B`; }