From feebdfcfe908bcc7807b6b052c97babcde46a5b2 Mon Sep 17 00:00:00 2001 From: swve Date: Thu, 27 Feb 2025 15:10:12 +0100 Subject: [PATCH] feat: use a lighter loading indicator --- .../Objects/Loaders/PageLoading.tsx | 73 +++++++++++-------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/apps/web/components/Objects/Loaders/PageLoading.tsx b/apps/web/components/Objects/Loaders/PageLoading.tsx index 472cd887..d0390339 100644 --- a/apps/web/components/Objects/Loaders/PageLoading.tsx +++ b/apps/web/components/Objects/Loaders/PageLoading.tsx @@ -7,44 +7,55 @@ const variants = { 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... +