feat: implement unified loading screens across various components

- Introduced a new UnifiedLoadingScreen component for consistent loading indicators in the application.
- Replaced existing loading implementations in LoginPage, AuthCallbackPage, DashboardLayout, and other components with the new unified loading screen.
- Updated translations for loading messages to enhance user experience and clarity.
- Improved loading states in the ElectricProvider and TokenHandler components to utilize the new loading screen, ensuring a cohesive look and feel during loading processes.
This commit is contained in:
Anish Sarkar 2026-01-24 19:42:07 +05:30
parent bba3cb1cf9
commit 22bd5e0f39
14 changed files with 191 additions and 141 deletions

View file

@ -0,0 +1,19 @@
import { useTranslations } from "next-intl";
import { Spinner } from "@/components/ui/spinner";
export default function AuthCallbackLoading() {
const t = useTranslations("auth");
return (
<div className="fixed inset-0 z-[9999] flex min-h-screen flex-col items-center justify-center bg-background">
<div className="flex flex-col items-center space-y-4">
<div className="h-12 w-12 flex items-center justify-center">
<Spinner size="xl" className="text-primary" />
</div>
<span className="text-muted-foreground text-sm min-h-[1.25rem] text-center max-w-md px-4">
{t("processing_authentication")}
</span>
</div>
</div>
);
}