diff --git a/apps/app/components/account/email-code-form.tsx b/apps/app/components/account/email-code-form.tsx index ff5f8632d..03f9ea822 100644 --- a/apps/app/components/account/email-code-form.tsx +++ b/apps/app/components/account/email-code-form.tsx @@ -5,6 +5,7 @@ import { CheckCircleIcon } from "@heroicons/react/20/solid"; import { Button, Input } from "components/ui"; // services import authenticationService from "services/authentication.service"; +import useToast from "hooks/use-toast"; // icons // types @@ -16,6 +17,7 @@ type EmailCodeFormValues = { export const EmailCodeForm = ({ onSuccess }: any) => { const [codeSent, setCodeSent] = useState(false); + const { setToastAlert } = useToast(); const { register, handleSubmit, @@ -53,6 +55,11 @@ export const EmailCodeForm = ({ onSuccess }: any) => { }) .catch((error) => { console.log(error); + setToastAlert({ + title: "Oops!", + type: "error", + message: "Enter the correct code to sign in", + }); setError("token" as keyof EmailCodeFormValues, { type: "manual", message: error.error, diff --git a/apps/app/components/account/email-password-form.tsx b/apps/app/components/account/email-password-form.tsx index 029485b8b..613077ac3 100644 --- a/apps/app/components/account/email-password-form.tsx +++ b/apps/app/components/account/email-password-form.tsx @@ -6,6 +6,7 @@ import { useForm } from "react-hook-form"; // ui import { Button, Input } from "components/ui"; import authenticationService from "services/authentication.service"; +import useToast from "hooks/use-toast"; // types type EmailPasswordFormValues = { @@ -15,6 +16,7 @@ type EmailPasswordFormValues = { }; export const EmailPasswordForm = ({ onSuccess }: any) => { + const { setToastAlert } = useToast(); const { register, handleSubmit, @@ -38,6 +40,11 @@ export const EmailPasswordForm = ({ onSuccess }: any) => { }) .catch((error) => { console.log(error); + setToastAlert({ + title: "Oops!", + type: "error", + message: "Enter the correct email address and password to sign in", + }); if (!error?.response?.data) return; Object.keys(error.response.data).forEach((key) => { const err = error.response.data[key]; diff --git a/apps/app/components/command-palette/index.tsx b/apps/app/components/command-palette/index.tsx index 9e6dfc860..865bca82d 100644 --- a/apps/app/components/command-palette/index.tsx +++ b/apps/app/components/command-palette/index.tsx @@ -105,6 +105,8 @@ const CommandPalette: React.FC = () => { if ((e.ctrlKey || e.metaKey) && e.key === "k") { e.preventDefault(); setIsPaletteOpen(true); + } else if (e.ctrlKey && e.key === "c") { + console.log("Text copied"); } else if (e.key === "c") { e.preventDefault(); setIsIssueModalOpen(true); @@ -128,24 +130,23 @@ const CommandPalette: React.FC = () => { setIsBulkDeleteIssuesModalOpen(true); } else if ((e.ctrlKey || e.metaKey) && e.altKey && e.key === "c") { e.preventDefault(); + if (!router.query.issueId) return; + + const url = new URL(window.location.href); + copyTextToClipboard(url.href) + .then(() => { + setToastAlert({ + type: "success", + title: "Copied to clipboard", + }); + }) + .catch(() => { + setToastAlert({ + type: "error", + title: "Some error occurred", + }); + }); } - - if (!router.query.issueId) return; - - const url = new URL(window.location.href); - copyTextToClipboard(url.href) - .then(() => { - setToastAlert({ - type: "success", - title: "Copied to clipboard", - }); - }) - .catch(() => { - setToastAlert({ - type: "error", - title: "Some error occurred", - }); - }); } }, [toggleCollapsed, setToastAlert, router] diff --git a/apps/app/components/project/card.tsx b/apps/app/components/project/card.tsx index 4ef975128..dd6d96e32 100644 --- a/apps/app/components/project/card.tsx +++ b/apps/app/components/project/card.tsx @@ -46,14 +46,16 @@ export const ProjectCard: React.FC = (props) => { <>
-
+
{project.icon && ( {String.fromCodePoint(parseInt(project.icon))} )} - {project.name} - {project.identifier} + + {project.name} + + {project.identifier}
diff --git a/apps/app/components/project/cycles/stats-view/single-stat.tsx b/apps/app/components/project/cycles/stats-view/single-stat.tsx index 8dae743cf..886735d85 100644 --- a/apps/app/components/project/cycles/stats-view/single-stat.tsx +++ b/apps/app/components/project/cycles/stats-view/single-stat.tsx @@ -71,7 +71,9 @@ const SingleStat: React.FC = (props) => {
-

{cycle.name}

+

+ {cycle.name} +

diff --git a/apps/app/components/project/modules/single-module-card.tsx b/apps/app/components/project/modules/single-module-card.tsx index 7af928b6a..acd6d4d98 100644 --- a/apps/app/components/project/modules/single-module-card.tsx +++ b/apps/app/components/project/modules/single-module-card.tsx @@ -30,7 +30,7 @@ const SingleModuleCard: React.FC = ({ module }) => { }; return ( -
+