Update counter only on success
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -144,8 +144,10 @@ export default function TaskFormDialog(props: Props) {
|
||||
},
|
||||
connections: [props.connection!],
|
||||
},
|
||||
onCompleted: () => {
|
||||
updateStoreCounter(relayEnv, data.measureId, "tasks(first:0)", 1);
|
||||
onCompleted: (_response, errors) => {
|
||||
if (!errors) {
|
||||
updateStoreCounter(relayEnv, data.measureId, "tasks(first:0)", 1);
|
||||
}
|
||||
},
|
||||
});
|
||||
reset();
|
||||
|
||||
Reference in New Issue
Block a user