diff --git a/frontend/src/pages/survey/questions/summary.jsx b/frontend/src/pages/survey/questions/summary.jsx index d5c91bfa..3c8224e3 100644 --- a/frontend/src/pages/survey/questions/summary.jsx +++ b/frontend/src/pages/survey/questions/summary.jsx @@ -143,11 +143,6 @@ const Summary = () => { ) store.setResults(response.results) store.setUserToken(response.token) - const message = { - results: response.results, - notification: "Success" - }; - window.parent.postMessage(message, '*') router.push('/survey/result') } catch (e) { diff --git a/frontend/src/pages/survey/result.jsx b/frontend/src/pages/survey/result.jsx index 1cde6e2b..5c7e6a67 100644 --- a/frontend/src/pages/survey/result.jsx +++ b/frontend/src/pages/survey/result.jsx @@ -153,6 +153,11 @@ const Home = () => { const fullResults = await getFullResults(store.userToken) store.setDetailedResults(fullResults) setFullResultsLoaded(true) + const message = { + results: store.detailedResults, + notification: "Success" + }; + window.parent.postMessage(message, '*') } catch (error) { console.error(error) }