From 24812054dd85c95da15a994dde10295c0892c1ce Mon Sep 17 00:00:00 2001 From: Stephen Gordon Date: Thu, 21 Mar 2024 18:07:48 +0000 Subject: [PATCH] added auth again --- src/app/components/AuthPage/AuthPage.tsx | 6 +++--- src/app/layout.tsx | 4 +++- src/app/login/page.tsx | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/components/AuthPage/AuthPage.tsx b/src/app/components/AuthPage/AuthPage.tsx index 573066d..d732cad 100644 --- a/src/app/components/AuthPage/AuthPage.tsx +++ b/src/app/components/AuthPage/AuthPage.tsx @@ -18,8 +18,8 @@ export default function AuthPage ({children} : {children: React.ReactNode}) { useEffect(() => { - /* Uncomment for auth */ - /* if (window) { + + if (window) { console.log("window is here") if (window.matchMedia('(display-mode: standalone)').matches) { console.log('standalone') @@ -35,7 +35,7 @@ export default function AuthPage ({children} : {children: React.ReactNode}) { router.push('/'); } - } */ + } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 26d837c..5f8069a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -147,7 +147,9 @@ export default function RootLayout({ > router.push('/home')} + onSuccess={() => { + router.push('/home'); + }} appId={'cltk97hyk016h7afh32g4363z'} config={{ appearance: { diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index d01c508..9a89b8b 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -11,6 +11,7 @@ import { Button } from '../components/ui/button'; import { motion } from 'framer-motion'; import { BackgroundGradientAnimation } from '../components/ui/background-gradient-animation'; +import Link from 'next/link'; const Page = () => { const [isInstalled, setIsInstalled] = useState(false); @@ -74,6 +75,7 @@ const Page = () => { + home