import { FC, lazy } from "react"; export const lazify = >( fn: () => Promise, note?: string ): T => { return lazy(async () => { const result = await fn(); return { default: result, }; }) as any; };