Fix changing event uuid didn't change event data

Closes #1192

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-11-21 11:52:41 +01:00
parent e1469a5eec
commit 32706150e0
2 changed files with 12 additions and 3 deletions

View File

@@ -10,11 +10,12 @@ export function useFetchEvent(uuid?: string) {
error,
onError,
onResult,
refetch,
} = useQuery<{ event: IEvent }>(
FETCH_EVENT,
{
() => ({
uuid,
},
}),
() => ({
enabled: uuid !== undefined,
})
@@ -22,7 +23,7 @@ export function useFetchEvent(uuid?: string) {
const event = computed(() => fetchEventResult.value?.event);
return { event, loading, error, onError, onResult };
return { event, loading, error, onError, onResult, refetch };
}
export function useFetchEventBasic(uuid: string) {