From 25582dd1f1f6f4b9ca80683997f026d9557f8287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 2 Apr 2024 01:16:34 -0400 Subject: [PATCH] fix(pages): update bands page make "subscribe" or "unsubscribe" buttons update the ui immediately --- pages/bands.vue | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pages/bands.vue b/pages/bands.vue index 52a71c7..c1ad341 100644 --- a/pages/bands.vue +++ b/pages/bands.vue @@ -6,12 +6,18 @@ const { data: bands } = (await useApiFetch>("/band/all")) as unknown as { data: Ref }; - const { data: rd }: { data: any } = useAuth(); + const { + data: { value: rd }, + getSession, + } = useAuth(); + await getSession({ force: true }); + let inc = ref(1); + const data = ref(rd); const refresh = async () => { await useAuth().getSession({ force: true }); - rd.value = useAuth().data.value; + data.value = useAuth().data.value; + //inc.value += 1; }; - const hider = subscriptions; if (bands.value == null) bands.value = []; useHead({ @@ -21,7 +27,7 @@