completionId: cgen-d2c1f87f03a04671b5a98a11287f3043
cgen-d2c1f87f03a04671b5a98a11287f3043
This commit is contained in:
parent
d68775484d
commit
9363bab408
1 changed files with 11 additions and 0 deletions
|
|
@ -177,6 +177,17 @@ export default function Dashboard() {
|
|||
}
|
||||
}, [searchParams, profile?.user_type, updateProfile, setSearchParams]);
|
||||
|
||||
// Prevent infinite loading state - timeout after 10s
|
||||
useEffect(() => {
|
||||
if (isLoading) {
|
||||
const timeout = setTimeout(() => {
|
||||
console.warn("Dashboard loading timeout - forcing completion");
|
||||
setIsLoading(false);
|
||||
}, 10000);
|
||||
return () => clearTimeout(timeout);
|
||||
}
|
||||
}, [isLoading]);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window === "undefined" || !user) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue