Skip to content

Commit c340ec5

Browse files
HyteqHyteq
authored andcommitted
feat: cool new loading
1 parent 9704c69 commit c340ec5

4 files changed

Lines changed: 132 additions & 9 deletions

File tree

apps/dashboard/components/auth/auth-loading.tsx

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,44 @@
1-
"use client";
2-
3-
import { Loader2 } from "lucide-react";
1+
import { SpinnerIcon } from "@phosphor-icons/react";
42
import { cn } from "@/lib/utils";
53

64
export interface AuthLoadingProps {
75
className?: string;
86
}
7+
98
export function AuthLoading({ className }: AuthLoadingProps) {
109
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>
1542
</div>
1643
</div>
1744
);

apps/dashboard/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@
1111
},
1212
"dependencies": {
1313
"@databuddy/sdk": "workspace:*",
14+
"@nivo/sankey": "^0.99.0",
1415
"@phosphor-icons/react": "^2.1.10",
1516
"@tanstack/react-query": "^5.75.4",
1617
"@types/d3-scale": "^4.0.9",
18+
"@types/dagre": "^0.7.52",
1719
"@types/geojson": "^7946.0.16",
1820
"@types/leaflet": "^1.9.17",
1921
"@types/react-syntax-highlighter": "^15.5.13",
2022
"@uidotdev/usehooks": "^2.4.1",
23+
"@xyflow/react": "^12.7.0",
2124
"better-auth": "^1.2.7",
2225
"class-variance-authority": "^0.7.1",
2326
"classnames": "^2.5.1",
2427
"clsx": "^2.1.1",
2528
"cmdk": "^1.1.1",
2629
"d3-geo": "^3.1.1",
2730
"d3-scale": "^4.0.2",
31+
"dagre": "^0.8.5",
2832
"date-fns": "^4.1.0",
2933
"embla-carousel-react": "^8.6.0",
3034
"framer-motion": "^12.9.2",

0 commit comments

Comments
 (0)