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}` `${originURL}/${workspaceSlug}/projects/${projectId}/issues/${issueDetail?.id}`
).then(() => { ).then(() => {
setToastAlert({ setToastAlert({
type: "success", type: "info",
title: "Link Copied!", title: "Link Copied Successfully",
message: "Issue link copied to clipboard.", iconType: "copy",
}); });
}); });
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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