Redesign auth pages and enhance analytics UI with motion
All checks were successful
Build Frontend / build (push) Successful in 1m17s

Refactored login and registration pages for a modern, consistent look with animated backgrounds and improved form feedback. Enhanced analytics dashboard and metrics cards with framer-motion animations and visual polish. Updated MotionWrapper for flexible motion props and improved transitions. Minor UI/UX improvements and code cleanup throughout auth and analytics components.
This commit is contained in:
g
2026-01-12 04:06:36 +00:00
parent 02ba4b0e66
commit 5d9f8fa07b
7 changed files with 480 additions and 363 deletions

View File

@@ -2,28 +2,42 @@
import React, { Suspense, lazy } from "react";
// Use lazy loading for the form component
const LoginForm = lazy(() => import('./components/LoginForm'));
// Simple loading state for the Suspense boundary
// Background Component
const AuthBackground = () => (
<div className="absolute inset-0 overflow-hidden pointer-events-none">
<div className="absolute inset-0 bg-black" />
<div className="absolute top-0 left-0 w-full h-full bg-gradient-to-br from-indigo-500/20 via-purple-500/10 to-transparent" />
<div className="absolute top-1/4 left-1/4 w-96 h-96 bg-blue-500/20 rounded-full blur-3xl opacity-50 animate-pulse" />
<div className="absolute bottom-1/4 right-1/4 w-96 h-96 bg-purple-500/20 rounded-full blur-3xl opacity-50 animate-pulse delay-1000" />
</div>
);
// Loading State
function LoginLoading() {
return (
<div className="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-[#0F0F12]">
<div className="w-full max-w-md p-8 space-y-8 bg-white dark:bg-[#1F1F23] rounded-xl shadow-lg text-center">
<div className="mt-6 flex flex-col items-center justify-center">
<div className="w-12 h-12 border-4 border-t-blue-500 border-b-transparent border-l-transparent border-r-transparent rounded-full animate-spin"></div>
<p className="mt-4 text-gray-600 dark:text-gray-400">Loading login form...</p>
</div>
<div className="w-full max-w-md p-8 space-y-8 bg-black/40 backdrop-blur-xl border border-white/10 rounded-2xl shadow-2xl text-center relative z-10">
<div className="mt-6 flex flex-col items-center justify-center">
<div className="w-12 h-12 border-4 border-t-indigo-500 border-b-transparent border-l-transparent border-r-transparent rounded-full animate-spin"></div>
<p className="mt-4 text-zinc-400">Loading secure login...</p>
</div>
</div>
);
}
// Main page component that uses Suspense
// Main page component
export default function LoginPage() {
return (
<Suspense fallback={<LoginLoading />}>
<LoginForm />
</Suspense>
<div className="relative flex items-center justify-center min-h-screen overflow-hidden">
<AuthBackground />
<div className="flex flex-col items-center w-full px-4">
<Suspense fallback={<LoginLoading />}>
<LoginForm />
</Suspense>
</div>
</div>
);
}