'use client' import React, { useEffect, useState } from 'react'; import { Coins } from 'lucide-react'; import { Logo } from '@/components/Logo'; const subtexts = [ "Unearthing your treasures", "Polishing your gems", "Mining for good habits", "Stumbling upon brilliance", "Discovering your potential", "Crafting your success story", "Forging new paths", "Summoning success", "Brewing brilliance", "Charging up your awesome", "Assembling achievements", "Leveling up your day", "Questing for quality", "Unlocking awesomeness", "Plotting your progress", ]; const LoadingSpinner: React.FC = () => { const [currentSubtext, setCurrentSubtext] = useState('Loading your data'); const [animatedDots, setAnimatedDots] = useState(''); useEffect(() => { const randomIndex = Math.floor(Math.random() * subtexts.length); setCurrentSubtext(subtexts[randomIndex]); const dotAnimationInterval = setInterval(() => { setAnimatedDots(prevDots => { if (prevDots.length >= 3) { return ''; } return prevDots + '.'; }); }, 200); // Adjust timing as needed return () => clearInterval(dotAnimationInterval); }, []); return (
{currentSubtext && (

{currentSubtext}{animatedDots}

)}
); }; export default LoadingSpinner;