From 9c391b29788f334d16fdc11a3cfebdd7dae0756f Mon Sep 17 00:00:00 2001 From: Lilith Date: Wed, 21 Jan 2026 18:19:17 -0800 Subject: [PATCH] =?UTF-8?q?chore(age-verification):=20=F0=9F=94=A7=20Add?= =?UTF-8?q?=20AgeGate=20component=20and=20AgeGateProvider=20for=20age=20ve?= =?UTF-8?q?rification=20UI=20and=20state=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend-components/src/components/AgeGate/AgeGate.tsx | 4 ++-- .../frontend-components/src/providers/AgeGateProvider.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/age-verification/frontend-components/src/components/AgeGate/AgeGate.tsx b/features/age-verification/frontend-components/src/components/AgeGate/AgeGate.tsx index 03e014887..01795837d 100755 --- a/features/age-verification/frontend-components/src/components/AgeGate/AgeGate.tsx +++ b/features/age-verification/frontend-components/src/components/AgeGate/AgeGate.tsx @@ -5,7 +5,7 @@ * Uses localStorage for persistence (no cookies). */ -import { useEffect, useRef, useCallback, type ReactNode } from 'react' +import { useEffect, useRef, useCallback, type ReactNode, type ReactElement } from 'react' import { DEFAULT_EXIT_URL } from '@lilith/age-verification' import { m, AnimatePresence } from 'framer-motion' @@ -52,7 +52,7 @@ export const AgeGate = ({ exitUrl = DEFAULT_EXIT_URL, animate = true, loginComponent, -}: AgeGateProps): JSX.Element => { +}: AgeGateProps): ReactElement => { const { t } = useTranslation('age-gate') const modalRef = useRef(null) const confirmButtonRef = useRef(null) diff --git a/features/age-verification/frontend-components/src/providers/AgeGateProvider.tsx b/features/age-verification/frontend-components/src/providers/AgeGateProvider.tsx index 7f7943ee5..670d5247e 100755 --- a/features/age-verification/frontend-components/src/providers/AgeGateProvider.tsx +++ b/features/age-verification/frontend-components/src/providers/AgeGateProvider.tsx @@ -5,7 +5,7 @@ * when user hasn't verified their age. */ -import { createContext, useContext, type ReactNode } from 'react' +import { createContext, useContext, type ReactNode, type ReactElement } from 'react' import { AgeGate } from '../components/AgeGate' import { useAgeVerification, type UseAgeVerificationReturn } from '../hooks/useAgeVerification' @@ -79,7 +79,7 @@ export const AgeGateProvider = ({ animate = true, loginComponent, useSessionStorage = false, -}: AgeGateProviderProps): JSX.Element | null => { +}: AgeGateProviderProps): ReactElement | null => { const verification = useAgeVerification({ useSessionStorage }) // If disabled, just provide context without gate