Fix react query cache key problem for saved tasks (#1518)
This commit is contained in:
@@ -16,7 +16,7 @@ function CreateNewTaskFormPage() {
|
||||
const location = useLocation();
|
||||
|
||||
const { data, isFetching } = useQuery({
|
||||
queryKey: ["savedTask", template],
|
||||
queryKey: ["savedTasks", template],
|
||||
queryFn: async () => {
|
||||
const client = await getClient(credentialGetter);
|
||||
return client
|
||||
|
||||
@@ -245,7 +245,7 @@ function SavedTaskForm({ initialValues }: Props) {
|
||||
description: "Changes saved successfully",
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["savedTasks", template],
|
||||
queryKey: ["savedTasks"],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user