import { sleep } from '@incode/utils'; import getFinishStatus from '@incodetech/welcome/getFinishStatus'; import { useEffect } from 'react'; type FinishProps = { title: string; subtitle: string; token: string; workflowId: string; goNext: () => void; }; const Finish = ({ title, subtitle, workflowId, token, goNext, }: FinishProps) => { useEffect(() => { const finish = async () => { await getFinishStatus(workflowId, { token, }); await sleep(3000); goNext(); }; finish(); }, [token, workflowId, goNext]); return (

{title}

{subtitle}

); }; export default Finish;