feat: replace unified loading approach with global loading provider and refactor loading handling across components

- Introduced GlobalLoadingProvider to manage a consistent loading overlay across the application.
- Replaced existing loading implementations with useGlobalLoadingEffect hook for better control and to prevent animation resets.
- Updated components such as LoginPage, AuthCallbackPage, and DashboardLayout to utilize the new global loading mechanism.
- Removed UnifiedLoadingScreen component to streamline loading management and enhance user experience.
This commit is contained in:
Anish Sarkar 2026-01-25 16:15:25 +05:30
parent 2d17d1a1b6
commit 66a3c877ef
15 changed files with 294 additions and 140 deletions

View file

@ -1,15 +1,13 @@
"use client";
import { Suspense } from "react";
import { useTranslations } from "next-intl";
import { UnifiedLoadingScreen } from "@/components/ui/unified-loading-screen";
import TokenHandler from "@/components/TokenHandler";
export default function AuthCallbackPage() {
const t = useTranslations("auth");
// Suspense fallback returns null - the GlobalLoadingProvider handles the loading UI
// TokenHandler uses useGlobalLoadingEffect to show the loading screen
return (
<Suspense fallback={<UnifiedLoadingScreen variant="default" message={t("processing_authentication")} />}>
<Suspense fallback={null}>
<TokenHandler
redirectPath="/dashboard"
tokenParamName="token"