Merge branch 'main' into feature-copy_invite_link

This commit is contained in:
Philip Okugbe 2025-02-26 18:33:34 +00:00 committed by GitHub
commit 91c250ebdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import { modals } from "@mantine/modals";
import {
useResendInvitationMutation,
useRevokeInvitationMutation,
useGetInviteLink,
} from "@/features/workspace/queries/workspace-query.ts";
import { useTranslation } from "react-i18next";
import { notifications } from "@mantine/notifications";

View File

@ -83,6 +83,15 @@ export function useWorkspaceInvitationsQuery(
});
}
export function useGetInviteLink(
invitationId: string
): UseQueryResult<IInvitationLink,Error> {
return useQuery({
queryKey:["inviteLink",invitationId],
queryFn: () => getInviteLink({ invitationId }),
})
}
export function useCreateInvitationMutation() {
const { t } = useTranslation();
const queryClient = useQueryClient();