More fixes

This commit is contained in:
Alejandro González 2025-05-05 20:51:21 +02:00
parent 300e4af867
commit aa17bbb537
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@
<body>
<div id="app"></div>
<script src="https://tally.so/widgets/embed.js" defer></script>
<script src="https://tally.so/widgets/embed.js" async></script>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View File

@ -419,6 +419,7 @@ async function processPendingSurveys() {
const surveyToShow = surveys.find(
(survey) =>
localStorage.getItem(`survey-${survey.id}-display`) === null &&
survey.type === 'tally_app' &&
((survey.condition === 'active_player' && isActivePlayer) ||
(survey.assigned_users.includes(userId) && !survey.dismissed_users.includes(userId))),
)
@ -451,8 +452,8 @@ async function processPendingSurveys() {
console.error('Error opening Tally popup:', e)
}
console.info(`Found user survey to show with tally_id: ${tallyId}`)
window.Tally.openPopup(tallyId, popupOptions)
console.info(`Found user survey to show with tally_id: ${formId}`)
window.Tally.openPopup(formId, popupOptions)
} else {
console.info('No user survey to show')
}