import { Loader } from '@/components/Loader';
import { Suspense } from 'react';

function Loadable(Component: any) {
  return (props: any) => (
    <Suspense fallback={<Loader />}>
      <Component {...props} />
    </Suspense>
  );
}

export { Loadable };
