Skip to content

Commit

Permalink
fix: popup flickers when survey has already been completed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmealy committed Dec 18, 2024
1 parent 1461896 commit 51eaa9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/targetedOutreach/hooks/useShowOutreachPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const useShowOutreachPopup = (
const cookiesPopup = useAppSelector(selectCookieBanner)
const isSigner = useIsSafeOwner()

const isTargetedSafe = ACTIVE_OUTREACH.targetAll || !!submission?.outreachId
const submissionHasLoaded = submission !== undefined
const isTargetedSafe = submissionHasLoaded && (ACTIVE_OUTREACH.targetAll || !!submission?.outreachId)
const hasCompletedSurvey = !!submission?.completionDate

if (cookiesPopup?.open || isDismissed || !isSigner || !isTargetedSafe || hasCompletedSurvey) {
Expand Down

0 comments on commit 51eaa9e

Please sign in to comment.