Skip to content

Commit 728f1eb

Browse files
authored
Use destructured mutate method for dependency array (#2451)
Update useApiMutation const for createSnapshot to use destructured method
1 parent a7cb26f commit 728f1eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/pages/project/disks/DisksPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function DisksPage() {
104104
},
105105
})
106106

107-
const createSnapshot = useApiMutation('snapshotCreate', {
107+
const { mutate: createSnapshot } = useApiMutation('snapshotCreate', {
108108
onSuccess() {
109109
queryClient.invalidateQueries('snapshotList')
110110
addToast({ content: 'Snapshot successfully created' })
@@ -124,7 +124,7 @@ export function DisksPage() {
124124
label: 'Snapshot',
125125
onActivate() {
126126
addToast({ title: `Creating snapshot of disk '${disk.name}'` })
127-
createSnapshot.mutate({
127+
createSnapshot({
128128
query: { project },
129129
body: {
130130
name: genName(disk.name),

0 commit comments

Comments
 (0)