fix: issue link error toast alert (#5068)

This commit is contained in:
Anmol Singh Bhatia
2024-07-08 15:28:38 +05:30
committed by GitHub
parent 1cd55cd95b
commit 4e815c0fed
2 changed files with 4 additions and 4 deletions

View File

@@ -21,9 +21,9 @@ export const useLinkOperations = (workspaceSlug: string, projectId: string, issu
type: TOAST_TYPE.SUCCESS,
title: "Link created",
});
} catch (error) {
} catch (error: any) {
setToast({
message: "The link could not be created",
message: error?.data?.error ?? "The link could not be created",
type: TOAST_TYPE.ERROR,
title: "Link not created",
});

View File

@@ -52,9 +52,9 @@ export const IssueLinkRoot: FC<TIssueLinkRoot> = (props) => {
title: "Link created",
});
toggleIssueLinkModal(false);
} catch (error) {
} catch (error: any) {
setToast({
message: "The link could not be created",
message: error?.data?.error ?? "The link could not be created",
type: TOAST_TYPE.ERROR,
title: "Link not created",
});