|
1 | | -"use client"; |
2 | | - |
3 | | -import { Loader2 } from "lucide-react"; |
| 1 | +import { SpinnerIcon } from "@phosphor-icons/react"; |
4 | 2 | import { cn } from "@/lib/utils"; |
5 | 3 |
|
6 | 4 | export interface AuthLoadingProps { |
7 | 5 | className?: string; |
8 | 6 | } |
| 7 | + |
9 | 8 | export function AuthLoading({ className }: AuthLoadingProps) { |
10 | 9 | return ( |
11 | | - <div className={cn("flex min-h-screen items-center justify-center bg-background", className)}> |
12 | | - <div className="flex flex-col items-center gap-4"> |
13 | | - <Loader2 className="h-10 w-10 animate-[spin_0.5s_linear_infinite] text-primary" /> |
14 | | - <p className="text-sm text-muted-foreground">Loading...</p> |
| 10 | + <div className={cn("flex min-h-screen items-center justify-center bg-gradient-to-br from-background via-background to-muted/20", className)}> |
| 11 | + <div className="relative flex flex-col items-center gap-6"> |
| 12 | + {/* Outer glow ring */} |
| 13 | + <div className="absolute inset-0 rounded-full bg-gradient-to-r from-primary/20 via-primary/10 to-primary/20 blur-xl animate-pulse" /> |
| 14 | + |
| 15 | + {/* Main spinner container */} |
| 16 | + <div className="relative flex items-center justify-center"> |
| 17 | + {/* Background circle */} |
| 18 | + <div className="absolute h-20 w-20 rounded-full bg-gradient-to-r from-primary/10 to-primary/5 animate-ping" /> |
| 19 | + |
| 20 | + {/* Spinner */} |
| 21 | + <SpinnerIcon |
| 22 | + className="h-12 w-12 animate-spin text-primary drop-shadow-lg" |
| 23 | + /> |
| 24 | + </div> |
| 25 | + |
| 26 | + {/* Loading text with gradient */} |
| 27 | + <div className="flex flex-col items-center gap-2"> |
| 28 | + <h2 className="bg-gradient-to-r from-primary via-primary/80 to-primary bg-clip-text text-xl font-semibold text-transparent"> |
| 29 | + Loading your experience |
| 30 | + </h2> |
| 31 | + <div className="flex items-center gap-1"> |
| 32 | + <div className="h-1 w-1 rounded-full bg-primary/60 animate-bounce [animation-delay:-0.3s]" /> |
| 33 | + <div className="h-1 w-1 rounded-full bg-primary/60 animate-bounce [animation-delay:-0.15s]" /> |
| 34 | + <div className="h-1 w-1 rounded-full bg-primary/60 animate-bounce" /> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + |
| 38 | + {/* Subtle progress bar */} |
| 39 | + <div className="w-48 h-1 bg-muted rounded-full overflow-hidden"> |
| 40 | + <div className="h-full bg-gradient-to-r from-primary/50 to-primary rounded-full animate-pulse" /> |
| 41 | + </div> |
15 | 42 | </div> |
16 | 43 | </div> |
17 | 44 | ); |
|
0 commit comments