From e10fe50830d592d8b52052e4063f0e7dbbcf81e2 Mon Sep 17 00:00:00 2001 From: yoginawaka Date: Tue, 11 Feb 2025 18:32:07 +0000 Subject: [PATCH] Delete app/auth/page.tsx --- app/auth/page.tsx | 199 ---------------------------------------------- 1 file changed, 199 deletions(-) delete mode 100644 app/auth/page.tsx diff --git a/app/auth/page.tsx b/app/auth/page.tsx deleted file mode 100644 index 6656e99..0000000 --- a/app/auth/page.tsx +++ /dev/null @@ -1,199 +0,0 @@ -"use client" -import { memo, useEffect, useState, useCallback } from 'react'; -import { useRouter } from 'next/navigation'; -import Cookies from 'js-cookie'; -import { usePrivy } from '@privy-io/react-auth'; -import { Providers } from '@/components/providers/privy-provider'; -import { Mail, ArrowRight, Hexagon, LucideIcon } from 'lucide-react'; - -interface LoginButtonProps { - icon: LucideIcon; - text: string; - onClick: () => void; -} - -interface FeatureCardProps { - text: string; -} - -// Futuristic geometric background -const BackgroundEffect = memo(function BackgroundEffect() { - return ( -
- {/* Base gradient */} -
- - {/* Geometric patterns */} -
-
- {Array.from({ length: 5 }).map((_, i) => ( -
- -
- ))} -
-
- - {/* Modern gradient orbs */} -
-
-
- ); -}); - -// Enhanced loading animation -const LoadingSpinner = memo(function LoadingSpinner() { - return ( -
-
-
-
-
-
-
-
-
- ); -}); - -// Enhanced button with modern hover effects -const LoginButton = memo(function LoginButton({ icon: Icon, text, onClick }: LoginButtonProps) { - return ( - - ); -}); - -// Modern feature card -const FeatureCard = memo(function FeatureCard({ text }: FeatureCardProps) { - return ( -
-
-
-

{text}

-
-
- ); -}); - -const LoginContent = memo(function LoginContent() { - const router = useRouter(); - const [isLoading, setIsLoading] = useState(true); - const privy = usePrivy(); - - const handleLogin = useCallback(() => privy.login(), [privy]); - // const handleWalletConnect = useCallback(() => privy.connectWallet(), [privy]); - - useEffect(() => { - if (privy?.ready) { - setIsLoading(false); - if (privy.authenticated) { - localStorage.setItem('useremail', privy.user?.email?.address ?? "Guest"); - Cookies.set('privy-authenticated', 'true', { path: '/', expires: 1 }); - router.push('/dashboard'); - } - } - }, [privy.ready, privy.authenticated, router]); - - if (isLoading) return ; - - return ( -
- - -
-
-
- {/* Card backdrop blur effect */} -
- - {/* Content */} -
-
-

- ALMAZE -

-
- - Secure - - Seamless - - Smart -
-
- -
- - {/* */} -
- -
-

- By continuing, you agree to our{' '} - - Terms of Service - -

-
-
-
- -
- - - -
-
-
-
- ); -}); - -const Home = memo(function Home() { - return ( - - - - ); -}); - -export default Home; \ No newline at end of file