From 74e1b6b54494455fecc37f673569482c3fad1ce4 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sun, 24 Nov 2024 13:45:00 +0100 Subject: [PATCH] fix: transfer group not invalidating path (#1539) --- .../manage/users/groups/[id]/_transfer-group-ownership.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/nextjs/src/app/[locale]/manage/users/groups/[id]/_transfer-group-ownership.tsx b/apps/nextjs/src/app/[locale]/manage/users/groups/[id]/_transfer-group-ownership.tsx index a3a860d2b..9074c9ecf 100644 --- a/apps/nextjs/src/app/[locale]/manage/users/groups/[id]/_transfer-group-ownership.tsx +++ b/apps/nextjs/src/app/[locale]/manage/users/groups/[id]/_transfer-group-ownership.tsx @@ -4,6 +4,7 @@ import { useCallback, useState } from "react"; import { Button, useMatches } from "@mantine/core"; import { clientApi } from "@homarr/api/client"; +import { revalidatePathActionAsync } from "@homarr/common/client"; import { useConfirmModal, useModalAction } from "@homarr/modals"; import { showErrorNotification, showSuccessNotification } from "@homarr/notifications"; import { useI18n, useScopedI18n } from "@homarr/translation/client"; @@ -46,7 +47,7 @@ export const TransferGroupOwnership = ({ group }: TransferGroupOwnershipProps) = userId: id, }, { - onSuccess() { + async onSuccess() { setInnerOwnerId(id); showSuccessNotification({ title: tRoot("common.notification.transfer.success"), @@ -55,6 +56,7 @@ export const TransferGroupOwnership = ({ group }: TransferGroupOwnershipProps) = user: name, }), }); + await revalidatePathActionAsync(`/manage/users/groups/${group.id}`); }, onError() { showErrorNotification({