diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-18 11:02:39 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-18 11:02:39 +0700 |
| commit | b6f6bf23f90ff0dfadf9bf0af8866c2cfc17aa9c (patch) | |
| tree | 55030557d97f8c3376cdf3547bd619b6ab3a8b9c /src/lib/auth/components/RegisterDesktop.jsx | |
| parent | f01f28a7eac76c6da5bf857bfc80fd347586ce7f (diff) | |
handling redirect login
Diffstat (limited to 'src/lib/auth/components/RegisterDesktop.jsx')
| -rw-r--r-- | src/lib/auth/components/RegisterDesktop.jsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/auth/components/RegisterDesktop.jsx b/src/lib/auth/components/RegisterDesktop.jsx index 86a5027d..a2bc98c2 100644 --- a/src/lib/auth/components/RegisterDesktop.jsx +++ b/src/lib/auth/components/RegisterDesktop.jsx @@ -10,6 +10,7 @@ import { useEffect } from 'react' import { setCookie } from 'cookies-next' import { signIn, useSession } from 'next-auth/react' import { useRouter } from 'next/router' +import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner' const RegisterDesktop = () => { const { @@ -31,7 +32,7 @@ const RegisterDesktop = () => { const router = useRouter() const handleGoogle = async () => { - await signIn('google', { callbackUrl: '/register' }) + await signIn('google', { callbackUrl: '/register?source=google' }) } useEffect(() => { @@ -41,6 +42,17 @@ const RegisterDesktop = () => { } },[session]) + if (router.query.source) { + return ( + <BottomPopup active={true} close=''> + <div className='leading-7 text-gray_r-12/80 flex justify-center'>Mohon Tunggu</div> + <div className='container flex justify-center my-4'> + <LogoSpinner width={48} height={48} /> + </div> + </BottomPopup> + ) + } + return ( <DesktopView> <div className='container mx-auto'> |
