From 57df92ab2c2ae768fb9a3c0794997005c389c6b3 Mon Sep 17 00:00:00 2001 From: swve Date: Fri, 16 May 2025 23:49:53 +0200 Subject: [PATCH] feat: refactor PageLoading component to enhance loading animation and visual feedback --- .../Objects/Loaders/PageLoading.tsx | 89 +++++++------------ 1 file changed, 33 insertions(+), 56 deletions(-) diff --git a/apps/web/components/Objects/Loaders/PageLoading.tsx b/apps/web/components/Objects/Loaders/PageLoading.tsx index d0390339..a2aff1c8 100644 --- a/apps/web/components/Objects/Loaders/PageLoading.tsx +++ b/apps/web/components/Objects/Loaders/PageLoading.tsx @@ -1,64 +1,41 @@ 'use client' +import { Loader2 } from 'lucide-react' import { motion } from 'framer-motion' -const variants = { - hidden: { opacity: 0, x: 0, y: 0 }, - enter: { opacity: 1, x: 0, y: 0 }, - exit: { opacity: 0, x: 0, y: 0 }, -} - -// Animation variants for the dots -const dotVariants = { - initial: { scale: 0.8, opacity: 0.4 }, - animate: (i: number) => ({ - scale: [0.8, 1.2, 0.8], - opacity: [0.4, 1, 0.4], - transition: { - duration: 1.5, - repeat: Infinity, - delay: i * 0.2, - ease: "easeInOut" - } - }) -} - function PageLoading() { return ( - -
-
- {/* Animated dots */} -
- {[0, 1, 2, 3, 4].map((i) => ( - - ))} -
- - - Loading... - -
-
-
+
+ + + +
) }