diff --git a/cannamanage-frontend/src/components/consent-banner.tsx b/cannamanage-frontend/src/components/consent-banner.tsx index 2455bb9..99ce7cb 100644 --- a/cannamanage-frontend/src/components/consent-banner.tsx +++ b/cannamanage-frontend/src/components/consent-banner.tsx @@ -19,12 +19,12 @@ export function ConsentBanner() { const t = useTranslations("consent") const [marketingChecked, setMarketingChecked] = useState(false) - const { data: consentCheck, isLoading } = useConsentCheckQuery() + const { data: consentCheck, isLoading, isError } = useConsentCheckQuery() const grantMutation = useGrantConsentMutation() const deleteMutation = useDeleteAccountMutation() - // Don't show if still loading or consent already granted - if (isLoading || consentCheck?.hasDataProcessingConsent) { + // Don't show if loading, errored (fail open), or consent already granted + if (isLoading || isError || consentCheck?.hasDataProcessingConsent) { return null }