export function clientOnly(fn: () => T): T | undefined { return typeof window !== "undefined" ? fn() : undefined; }