From 5f4a0a311106a600de097339e8aa205cca9cf29d Mon Sep 17 00:00:00 2001 From: SySagar Date: Sun, 15 Sep 2024 19:26:07 +0530 Subject: [PATCH] fix: shared space query invalidation --- .../src/app/[orgShortcode]/_components/new-space-modal.tsx | 6 +++++- .../src/app/[orgShortcode]/_components/sidebar-content.tsx | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/[orgShortcode]/_components/new-space-modal.tsx b/apps/web/src/app/[orgShortcode]/_components/new-space-modal.tsx index 238792b1..32e47971 100644 --- a/apps/web/src/app/[orgShortcode]/_components/new-space-modal.tsx +++ b/apps/web/src/app/[orgShortcode]/_components/new-space-modal.tsx @@ -98,7 +98,11 @@ export function NewSpaceModal() { spaceDescription: values.description, spaceColor: values.color ?? 'cyan', spaceType: values.type - }).catch(() => null); + }) + .then(() => { + platform.useUtils().spaces.getOrgMemberSpaces.invalidate(); + }) + .catch(() => null); form.reset(); }; diff --git a/apps/web/src/app/[orgShortcode]/_components/sidebar-content.tsx b/apps/web/src/app/[orgShortcode]/_components/sidebar-content.tsx index d3426f3e..c87c6076 100644 --- a/apps/web/src/app/[orgShortcode]/_components/sidebar-content.tsx +++ b/apps/web/src/app/[orgShortcode]/_components/sidebar-content.tsx @@ -135,7 +135,7 @@ function SpaceItem({ {/* - + TODO: Add in with the notifications Notifications @@ -154,7 +154,7 @@ function SpaceItem({ - + {