Fix cubic review

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-01 15:54:33 +04:00
parent 8f68f7116a
commit d0cefdee2f
6 changed files with 43 additions and 38 deletions

View File

@@ -121,17 +121,13 @@ export const deleteAssetMutation = graphql`
`;
export const useDeleteAsset = (
asset?: { id?: string; name?: string },
connectionId?: string,
asset: { id?: string; name?: string },
connectionId: string,
) => {
const [mutate] = useMutation(deleteAssetMutation);
const confirm = useConfirm();
const { __ } = useTranslate();
if (!asset) {
return () => {};
}
return () => {
if (!asset.id || !asset.name) {
return alert(__("Failed to delete asset: missing id or name"));
@@ -141,7 +137,7 @@ export const useDeleteAsset = (
promisifyMutation(mutate)({
variables: {
input: {
assetId: asset.id!,
assetId: asset.id,
},
connections: [connectionId],
},