wip: multi accounts

This commit is contained in:
2024-02-19 09:58:27 +07:00
parent 0f06522c28
commit bfe35ad885
13 changed files with 537 additions and 465 deletions

View File

@@ -6,12 +6,12 @@ export function useEvent(id: string) {
const { isLoading, isError, data } = useQuery({
queryKey: ["event", id],
queryFn: async () => {
const event = await ark.get_event(id);
if (!event)
throw new Error(
`Cannot get event with ${id}, will be retry after 10 seconds`,
);
return event;
try {
const event = await ark.get_event(id);
return event;
} catch (e) {
throw new Error(e);
}
},
refetchOnWindowFocus: false,
refetchOnMount: false,