From 49fbbc7ca66002bc7f159c8e1f6ab67f981665cd Mon Sep 17 00:00:00 2001 From: corpulent Date: Sat, 6 Aug 2022 01:02:25 +0300 Subject: [PATCH] fix: on save errors --- services/frontend/src/hooks/useProject.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/frontend/src/hooks/useProject.ts b/services/frontend/src/hooks/useProject.ts index 6c1caa3..ab4178e 100644 --- a/services/frontend/src/hooks/useProject.ts +++ b/services/frontend/src/hooks/useProject.ts @@ -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"); } } },