Merge pull request #101 from ctk-hq/fix/on-save-errors

fix: on save errors
pull/102/head
Artem Golub 3 years ago committed by GitHub
commit 2fb95e4764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@ import axios from "axios";
import _ from "lodash";
import { useQuery, useMutation, useQueryClient } from "react-query";
import { API_SERVER_URL } from "../constants";
import { getLocalStorageJWTKeys } from "../utils";
import { getLocalStorageJWTKeys, toaster } from "../utils";
import { IProject, IProjectPayload } from "../types";
import useLocalStorageJWTKeys from "./useLocalStorageJWTKeys";
@ -129,9 +129,9 @@ export const useUpdateProject = (uuid: string | undefined) => {
return data;
} catch (err: any) {
if (err.response.status === 404) {
// console.error("Resource could not be found!");
toaster("You are not the owner of this project!", "error");
} else {
// console.error(err.message);
toaster(err.message, "error");
}
}
},

Loading…
Cancel
Save