From aa6de76ded160bb416fc14ba6dfa5de4ce8e7a71 Mon Sep 17 00:00:00 2001 From: LandaMm Date: Sat, 7 Jun 2025 01:33:50 +0200 Subject: [PATCH] feat: redirect to verify pages --- web/src/layout/AuthLayout.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/web/src/layout/AuthLayout.tsx b/web/src/layout/AuthLayout.tsx index 77bbede..ab6ec4d 100644 --- a/web/src/layout/AuthLayout.tsx +++ b/web/src/layout/AuthLayout.tsx @@ -63,6 +63,18 @@ const AuthLayout = () => { connecting, ]); + const verificationRequired = useMemo(() => { + return ( + authProfile?.email_verified === false || + authProfile?.avatar_verified === false || + authProfile?.verified === false + ); + }, [ + authProfile?.avatar_verified, + authProfile?.email_verified, + authProfile?.verified, + ]); + // OAuth useEffect(() => { console.log( @@ -140,7 +152,7 @@ const AuthLayout = () => { if ( !signInRequired && - authProfile?.email_verified === false && + verificationRequired && !location.pathname.startsWith("/verify") ) { return ;