formatted code
This commit is contained in:
@@ -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>({
|
||||
|
||||
@@ -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 });
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user