Profile does not retry

This commit is contained in:
2024-07-29 23:27:18 +02:00
parent 9cb34839ec
commit 386472e680
9 changed files with 29 additions and 15 deletions
+2
View File
@@ -8,10 +8,12 @@ export const profileSelfQueryOptions = (Api: ReturnType<typeof useApi>) =>
user: await Api.user(),
posts: await Api.userPosts(Api.authenticatedUser?.id ?? 0),
}),
retry: false,
});
export const profileQueryOptions = (Api: ReturnType<typeof useApi>, id?: number) =>
queryOptions({
queryKey: ['profile', { id }],
queryFn: async () => ({ user: await Api.user(id), posts: await Api.userPosts(id) }),
retry: false,
});