Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: don't show ExitIntentPopup for authed users

Blue Mouse43e0a7db5b18
diff --git a/web/app/components/ExitIntentPopup.tsx b/web/app/components/ExitIntentPopup.tsx
index eade24577..5176f1282 100644
--- a/web/app/components/ExitIntentPopup.tsx
+++ b/web/app/components/ExitIntentPopup.tsx
@@ -2,6 +2,7 @@ import { XIcon } from 'lucide-react'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Link } from 'react-router'
+import { useAuth } from '~/providers/AuthProvider'
import { Badge } from '~/ui/Badge'
import { trackCustom } from '~/utils/analytics'
@@ -17,6 +18,7 @@ const COOKIE_EXPIRATION = 7 * 24 * 60 * 60
export default function ExitIntentPopup({
isStandalone = false,
}: ExitIntentPopupProps) {
+ const { isAuthenticated } = useAuth()
const { t } = useTranslation('common')
const [isVisible, setIsVisible] = useState(false)
const [isDismissed, setIsDismissed] = useState(false)
@@ -90,7 +92,7 @@ export default function ExitIntentPopup({
}
}
- if (!isVisible || isDismissed || isStandalone) {
+ if (!isVisible || isDismissed || isStandalone || isAuthenticated) {
return null
}