Skip to content

Commit 364d26f

Browse files
committed
chore: update
1 parent 7b1959d commit 364d26f

File tree

1 file changed

+9
-4
lines changed
  • src/evently.client/src/routes/gatherings

1 file changed

+9
-4
lines changed

src/evently.client/src/routes/gatherings/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ export const Route = createFileRoute("/gatherings/")({
1212
component: GatheringsPage,
1313
loader: async () => {
1414
let categories: Category[] = [];
15-
try {
16-
categories = await getCategories();
17-
} catch (error) {
18-
console.error(error);
15+
let attempts = 2;
16+
while (attempts > 0) {
17+
try {
18+
categories = await getCategories();
19+
break;
20+
} catch (error) {
21+
attempts -= 1;
22+
console.error(error);
23+
}
1924
}
2025
return { categories };
2126
},

0 commit comments

Comments
 (0)