completionId: cgen-87479be916654f4999cc7c1417293a31

cgen-87479be916654f4999cc7c1417293a31
This commit is contained in:
Builder.io 2025-11-05 07:12:12 +00:00
parent 031e807db0
commit e047073ce0

View file

@ -377,8 +377,7 @@ export default function Dashboard() {
applicationsResult, applicationsResult,
achievementsResult, achievementsResult,
followerCountResult, followerCountResult,
] = await Promise.race([ ] = await Promise.allSettled([
Promise.allSettled([
// Projects // Projects
aethexProjectService.getUserProjects(userId).catch(() => []), aethexProjectService.getUserProjects(userId).catch(() => []),
// Teams // Teams
@ -412,9 +411,7 @@ export default function Dashboard() {
.eq("following_id", userId) .eq("following_id", userId)
.then(({ count }) => typeof count === "number" ? count : 0) .then(({ count }) => typeof count === "number" ? count : 0)
.catch(() => 0), .catch(() => 0),
]), ]);
timeoutPromise,
]) as any[];
// Extract results from settled promises // Extract results from settled promises
const userProjects = projectsResult.status === "fulfilled" ? projectsResult.value : []; const userProjects = projectsResult.status === "fulfilled" ? projectsResult.value : [];