Skip to content

Commit

Permalink
Moved message to proper place
Browse files Browse the repository at this point in the history
  • Loading branch information
Juustoisa committed Feb 23, 2024
1 parent 9532e05 commit 1fe7d04
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/src/pages/survey/result.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,18 @@ 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)
}
}
}, [])

if (store.industries.length !== 0 && fullResultsLoaded) {
const message = {
results: store.detailedResults,
notification: "Success"
}
window.parent.postMessage(message, '*')
maxPoints = store.detailedResults.surveyResult.maxPoints
userPoints = store.detailedResults.surveyResult.userPoints
text = store.detailedResults.surveyResult.text
Expand Down

0 comments on commit 1fe7d04

Please sign in to comment.