From 679fba4f66f1e05fb4601d366621c72cc331e8dd Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 16 Sep 2023 09:43:26 +0800 Subject: [PATCH] Make relationship ui state update faster --- src/components/account-info.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx index 24780fae..aae0db9e 100644 --- a/src/components/account-info.jsx +++ b/src/components/account-info.jsx @@ -564,6 +564,8 @@ function RelatedActions({ info, instance, authenticated, standalone }) { try { const relationships = await fetchRelationships; console.log('fetched relationship', relationships); + setRelationshipUIState('default'); + if (relationships.length) { const relationship = relationships[0]; setRelationship(relationship); @@ -625,7 +627,6 @@ function RelatedActions({ info, instance, authenticated, standalone }) { } } } - setRelationshipUIState('default'); } catch (e) { console.error(e); setRelationshipUIState('error');