Skip to content

Commit

Permalink
switched message to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
Juustoisa committed Feb 12, 2024
1 parent 2196dbc commit 9532e05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions frontend/src/pages/survey/questions/summary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/pages/survey/result.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 9532e05

Please sign in to comment.