diff --git a/petstore/petstoreapp/soulmachines-react-app/src/routes/DPChat.js b/petstore/petstoreapp/soulmachines-react-app/src/routes/DPChat.js index 4b8edd2d..c865879c 100644 --- a/petstore/petstoreapp/soulmachines-react-app/src/routes/DPChat.js +++ b/petstore/petstoreapp/soulmachines-react-app/src/routes/DPChat.js @@ -63,9 +63,11 @@ function DPChat({ useEffect(() => { // send init event, since we will finish loading before we display the DP - setTimeout(() => { - dispatch(sendTextMessage({ text: '...' })); - }, 5000); + if (connected) { + setTimeout(() => { + dispatch(sendTextMessage({ text: '...' })); + }, 2500); + } // run resize once on mount, then add listener for future resize events handleResize(); window.addEventListener('resize', handleResize); diff --git a/petstore/petstoreapp/soulmachines-react-app/src/routes/Loading.js b/petstore/petstoreapp/soulmachines-react-app/src/routes/Loading.js index dab19faf..3f8293f2 100644 --- a/petstore/petstoreapp/soulmachines-react-app/src/routes/Loading.js +++ b/petstore/petstoreapp/soulmachines-react-app/src/routes/Loading.js @@ -157,7 +157,11 @@ function Loading({ }; const history = useHistory(); useEffect(() => { - if (skip === true && connected === true) history.push('/video'); + if (skip === true && connected === true) { + setTimeout(() => { + history.push('/video'); + }, 2500); + } }, [connected, skip]); return (