fix(front): fix getting result from interactable object in InteractView

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-09-05 15:52:27 +02:00
parent cfc984345e
commit 31b2d065a9
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -68,7 +68,13 @@ const { onResult, onError, loading } = useQuery<{
})
);
onResult(async ({ data: { interact } }) => {
onResult(async (result) => {
if (result.loading) return;
if (!result.data) {
errors.push(t("This URL is not supported"));
return;
}
const interact = result.data.interact;
switch (interact.__typename) {
case "Group":
await router.replace({