refactor(Loading): update Loading component import paths
- Changed import paths for the Loading component from "@/app/loading" to "@/components/loading" across multiple files to maintain consistency and improve modularity. - Removed the Loading component definition from loading.tsx, simplifying the file structure.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect, ReactNode } from "react";
|
||||
import { useUser } from "./";
|
||||
import Loading from "@/app/loading";
|
||||
import Loading from "@/components/loading";
|
||||
|
||||
interface AuthGuardProps {
|
||||
children: ReactNode;
|
||||
@@ -20,7 +20,7 @@ const AuthGuard = ({ children }: AuthGuardProps): React.ReactNode => {
|
||||
}, [isLoading, isAuthenticated, router]);
|
||||
|
||||
if (isLoading || !isAuthenticated) {
|
||||
return <Loading />;
|
||||
return <Loading className="min-h-svh flex-none" />;
|
||||
}
|
||||
|
||||
return children;
|
||||
|
||||
Reference in New Issue
Block a user