Files
probo/apps/console/src/hooks/graph/TrustCenterAuditGraph.ts
Émile Ré aa5696b5d3 Add eslint-plugin-import
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-22 19:57:10 +04:00

30 lines
897 B
TypeScript

import { graphql } from "relay-runtime";
import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterAuditGraphUpdateMutation } from "/__generated__/core/TrustCenterAuditGraphUpdateMutation.graphql";
export const trustCenterAuditUpdateMutation = graphql`
mutation TrustCenterAuditGraphUpdateMutation($input: UpdateAuditInput!) {
updateAudit(input: $input) {
audit {
id
trustCenterVisibility
...TrustCenterAuditsCardFragment
}
}
}
`;
export function useTrustCenterAuditUpdate() {
const { __ } = useTranslate();
return useMutationWithToasts<TrustCenterAuditGraphUpdateMutation>(
trustCenterAuditUpdateMutation,
{
successMessage: __("Audit visibility updated successfully."),
errorMessage: __("Failed to update audit visibility"),
},
);
}