|
| 1 | +export function DashboardSkeleton() { |
| 2 | + return ( |
| 3 | + <div className="min-h-screen relative bg-gradient-pattern overflow-hidden"> |
| 4 | + <main className="container relative mx-auto px-4 py-8"> |
| 5 | + <div className="space-y-8"> |
| 6 | + {/* Page Header Skeleton */} |
| 7 | + <div className="relative rounded-xl p-8 overflow-hidden backdrop-blur-xl border border-white/[0.05]"> |
| 8 | + <div className="absolute inset-0 bg-gradient-to-br from-accent/[0.08] to-primary-500/[0.05]" /> |
| 9 | + <div className="absolute inset-0 border border-white/[0.05] rounded-xl" /> |
| 10 | + <div className="relative"> |
| 11 | + <div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4"> |
| 12 | + <div className="space-y-3"> |
| 13 | + <div className="h-10 w-64 bg-white/5 rounded-lg animate-pulse" /> |
| 14 | + <div className="h-4 w-96 bg-white/5 rounded animate-pulse" /> |
| 15 | + </div> |
| 16 | + </div> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | + |
| 20 | + {/* Overview Cards Skeleton */} |
| 21 | + <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"> |
| 22 | + {Array.from({ length: 4 }).map((_, i) => ( |
| 23 | + <div |
| 24 | + key={i} |
| 25 | + className="relative overflow-hidden border-0 rounded-lg" |
| 26 | + > |
| 27 | + <div className="absolute inset-0 bg-background-800/40 backdrop-blur-xl" /> |
| 28 | + <div className="absolute inset-0 bg-gradient-to-br from-accent/[0.08] to-primary-500/[0.05]" /> |
| 29 | + <div className="absolute inset-0 border border-white/[0.05] rounded-lg" /> |
| 30 | + <div className="relative z-10 p-6 space-y-4"> |
| 31 | + <div className="h-8 w-32 bg-white/5 rounded-lg animate-pulse" /> |
| 32 | + <div className="h-4 w-24 bg-white/5 rounded animate-pulse" /> |
| 33 | + </div> |
| 34 | + {/* Shimmer effect */} |
| 35 | + <div className="absolute inset-0 -z-10"> |
| 36 | + <div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-shimmer" /> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + ))} |
| 40 | + </div> |
| 41 | + |
| 42 | + <div className="grid grid-cols-1 lg:grid-cols-3 gap-8"> |
| 43 | + {/* Left Column - Pools Table Skeleton */} |
| 44 | + <div className="lg:col-span-2 space-y-8"> |
| 45 | + <div className="relative rounded-xl overflow-hidden backdrop-blur-xl border border-white/[0.05]"> |
| 46 | + <div className="absolute inset-0 bg-gradient-to-br from-accent/[0.08] to-primary-500/[0.05]" /> |
| 47 | + <div className="absolute inset-0 border border-white/[0.05] rounded-xl" /> |
| 48 | + <div className="relative p-6"> |
| 49 | + <div className="flex items-center justify-between mb-6"> |
| 50 | + <div className="h-7 w-48 bg-white/5 rounded-lg animate-pulse" /> |
| 51 | + <div className="h-5 w-24 bg-white/5 rounded animate-pulse" /> |
| 52 | + </div> |
| 53 | + <div className="space-y-3"> |
| 54 | + {Array.from({ length: 3 }).map((_, i) => ( |
| 55 | + <div |
| 56 | + key={i} |
| 57 | + className="relative p-4 rounded-lg backdrop-blur-sm border border-white/[0.05] |
| 58 | + before:absolute before:inset-0 before:bg-background-800/30 before:-z-10" |
| 59 | + > |
| 60 | + <div className="relative flex items-center gap-4"> |
| 61 | + {/* Logo Skeleton */} |
| 62 | + <div className="relative h-10 w-10"> |
| 63 | + <div className="absolute inset-0 rounded-full bg-gradient-to-br from-accent/10 to-primary-500/10 animate-pulse-slow" /> |
| 64 | + <div className="absolute inset-0 rounded-full bg-white/5 animate-pulse backdrop-blur-sm" /> |
| 65 | + </div> |
| 66 | + |
| 67 | + {/* Token Info Skeleton */} |
| 68 | + <div className="flex-1 space-y-2"> |
| 69 | + <div className="h-5 w-24 bg-white/5 rounded animate-pulse" /> |
| 70 | + <div className="h-4 w-32 bg-white/5 rounded animate-pulse" /> |
| 71 | + </div> |
| 72 | + |
| 73 | + {/* Chart Skeleton */} |
| 74 | + <div className="hidden sm:block"> |
| 75 | + <div className="h-12 w-32 bg-white/5 rounded animate-pulse" /> |
| 76 | + </div> |
| 77 | + |
| 78 | + {/* Liquidity Skeleton */} |
| 79 | + <div className="hidden lg:block space-y-2"> |
| 80 | + <div className="h-4 w-24 bg-white/5 rounded animate-pulse" /> |
| 81 | + <div className="h-3 w-16 bg-white/5 rounded animate-pulse" /> |
| 82 | + </div> |
| 83 | + </div> |
| 84 | + |
| 85 | + {/* Loading shimmer effect */} |
| 86 | + <div className="absolute inset-0 -z-20"> |
| 87 | + <div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-shimmer" /> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + ))} |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + |
| 96 | + {/* Right Column - Activity Skeleton */} |
| 97 | + <div className="relative rounded-xl overflow-hidden backdrop-blur-xl border border-white/[0.05]"> |
| 98 | + <div className="absolute inset-0 bg-gradient-to-br from-accent/[0.08] to-primary-500/[0.05]" /> |
| 99 | + <div className="absolute inset-0 border border-white/[0.05] rounded-xl" /> |
| 100 | + <div className="relative p-6"> |
| 101 | + <div className="h-7 w-40 bg-white/5 rounded-lg animate-pulse mb-6" /> |
| 102 | + <div className="space-y-4"> |
| 103 | + {Array.from({ length: 5 }).map((_, i) => ( |
| 104 | + <div |
| 105 | + key={i} |
| 106 | + className="relative rounded-lg p-4 border border-white/[0.05]" |
| 107 | + > |
| 108 | + <div className="flex items-start gap-4"> |
| 109 | + <div className="flex-1 space-y-3"> |
| 110 | + <div className="flex items-center justify-between gap-2"> |
| 111 | + <div className="h-4 w-20 bg-white/5 rounded animate-pulse" /> |
| 112 | + <div className="h-3 w-16 bg-white/5 rounded animate-pulse" /> |
| 113 | + </div> |
| 114 | + <div className="flex items-center gap-2"> |
| 115 | + <div className="h-6 w-16 bg-white/5 rounded-full animate-pulse" /> |
| 116 | + <div className="h-4 w-40 bg-white/5 rounded animate-pulse" /> |
| 117 | + </div> |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + {/* Shimmer effect */} |
| 121 | + <div className="absolute inset-0 -z-10"> |
| 122 | + <div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-shimmer" /> |
| 123 | + </div> |
| 124 | + </div> |
| 125 | + ))} |
| 126 | + </div> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + </div> |
| 131 | + </main> |
| 132 | + |
| 133 | + {/* Dynamic glow effects */} |
| 134 | + <div className="fixed inset-0 pointer-events-none"> |
| 135 | + <div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,var(--accent-cyan)/10%,transparent_50%)]" /> |
| 136 | + <div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom,var(--primary-500)/5%,transparent_50%)]" /> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + ); |
| 140 | +} |
0 commit comments