formatted code

This commit is contained in:
2024-11-28 23:44:34 -06:00
parent b1a32353f9
commit 249daeea3a
3 changed files with 5 additions and 16 deletions

View File

@@ -49,9 +49,7 @@ export const CreateNewListButton = () => {
onOpenChange(false);
form.reset();
},
onSettled: () => {
void utils.list.getAll.invalidate();
},
onSettled: () => void utils.list.getAll.invalidate(),
});
const form = useForm<ListCreationSchema>({

View File

@@ -24,17 +24,13 @@ export const ListButton = ({ id, title }: { id: number; title: string }) => {
onSuccess: () => {
toast.success("List successfully renamed.");
},
onSettled: () => {
void utils.list.getAll.invalidate();
},
onSettled: () => void utils.list.getAll.invalidate(),
});
const { mutate: deleteMutation } = api.list.delete.useMutation({
onSuccess: () => {
toast.success("List successfully deleted.");
},
onSettled: () => {
void utils.list.getAll.invalidate();
},
onSettled: () => void utils.list.getAll.invalidate(),
});
const handleRename = () => updateMutation({ listId: id, title: newName });

View File

@@ -43,17 +43,12 @@ export const CreateNewTaskButton = ({ listId }: { listId: number }) => {
onOpenChange(false);
form.reset();
},
onSettled: () => {
void utils.list.get.invalidate();
},
onSettled: () => void utils.list.get.invalidate(),
});
const form = useForm<TaskCreationSchema>({
resolver: zodResolver(taskCreationFormSchema),
defaultValues: {
listId,
title: "",
},
defaultValues: { listId, title: "" },
});
const onSubmit = (values: TaskCreationSchema) => {