import { useFrameModule } from '@/business/frame/hooks';
import { FrameModuleView } from '@/components/frame/FrameModuleView';
import { PageSkeleton } from '@/components/ui/page-skeleton';

interface FrameModuleProps {
  userName: string;
}

const FrameModule = ({ userName }: FrameModuleProps) => {
  const workflow = useFrameModule(userName);

  if (workflow.isLoading) {
    return <PageSkeleton />;
  }

  return <FrameModuleView workflow={workflow} />;
};

export default FrameModule;
