feat: copied to clipboard alerts

This commit is contained in:
anmolsinghbhatia 2023-04-28 15:14:16 +05:30
parent df4211e54f
commit 0658953d7a
7 changed files with 21 additions and 21 deletions

View File

@ -219,9 +219,9 @@ export const IssueDetailsSidebar: React.FC<Props> = ({
`${originURL}/${workspaceSlug}/projects/${projectId}/issues/${issueDetail?.id}`
).then(() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Issue link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
});
};

View File

@ -265,9 +265,9 @@ export const SinglePageBlock: React.FC<Props> = ({ block, projectDetails, index
`${originURL}/${workspaceSlug}/projects/${projectId}/issues/${block.issue}`
).then(() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Issue link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
});
};

View File

@ -57,9 +57,9 @@ export const SinglePageDetailedItem: React.FC<TSingleStatProps> = ({
`${originURL}/${workspaceSlug}/projects/${projectId}/pages/${page.id}`
).then(() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Page link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
});
};

View File

@ -58,9 +58,9 @@ export const SinglePageListItem: React.FC<TSingleStatProps> = ({
`${originURL}/${workspaceSlug}/projects/${projectId}/pages/${page.id}`
).then(() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Page link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
});
};

View File

@ -127,9 +127,9 @@ export const ProjectSidebarList: FC = () => {
typeof window !== "undefined" && window.location.origin ? window.location.origin : "";
copyTextToClipboard(`${originURL}/${workspaceSlug}/projects/${projectId}/issues`).then(() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Project link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
});
};

View File

@ -128,9 +128,9 @@ export const SingleProjectCard: React.FC<ProjectCardProps> = ({
copyTextToClipboard(`${originURL}/${workspaceSlug}/projects/${project.id}/issues`).then(() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Project link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
});
};

View File

@ -247,9 +247,9 @@ const SinglePage: NextPage = () => {
copyTextToClipboard(`${originURL}/${workspaceSlug}/projects/${projectId}/pages/${pageId}`).then(
() => {
setToastAlert({
type: "success",
title: "Link Copied!",
message: "Page link copied to clipboard.",
type: "info",
title: "Link Copied Successfully",
iconType: "copy",
});
}
);