diff --git a/src/pages/preferences/preferencesTabs/notificationTab/ClearSubscriptions.tsx b/src/pages/preferences/preferencesTabs/notificationTab/ClearSubscriptions.tsx index 5d3edc69e6..2c4d9ec2d3 100644 --- a/src/pages/preferences/preferencesTabs/notificationTab/ClearSubscriptions.tsx +++ b/src/pages/preferences/preferencesTabs/notificationTab/ClearSubscriptions.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; import { useMutation } from "@apollo/client"; import Button, { Variant } from "@leafygreen-ui/button"; +import pluralize from "pluralize"; import { usePreferencesAnalytics } from "analytics"; import { ConfirmationModal } from "components/ConfirmationModal"; import { useToastContext } from "context/toast"; @@ -23,9 +24,10 @@ export const ClearSubscriptions: React.FC = () => { onCompleted: (result) => { setShowModal(false); dispatchToast.success( - `Successfully cleared ${result.clearMySubscriptions} subscription${ - result.clearMySubscriptions !== 1 && "s" - }!` + `Successfully cleared ${result.clearMySubscriptions} ${pluralize( + "subscription", + result.clearMySubscriptions + )}.` ); }, onError: (err) => { diff --git a/src/pages/taskHistory/ColumnHeaders/index.tsx b/src/pages/taskHistory/ColumnHeaders/index.tsx index e346e415dc..0bcb56ee93 100644 --- a/src/pages/taskHistory/ColumnHeaders/index.tsx +++ b/src/pages/taskHistory/ColumnHeaders/index.tsx @@ -44,7 +44,7 @@ const ColumnHeaders: React.FC = ({ if (!buildVariantsForTaskName) { reportError( new Error("No build variants found for task name") - ).severe(); + ).warning(); dispatchToast.error(`No build variants found for task: ${taskName}`); } }, diff --git a/src/pages/variantHistory/ColumnHeaders.tsx b/src/pages/variantHistory/ColumnHeaders.tsx index aaeba13247..8319d9aacc 100644 --- a/src/pages/variantHistory/ColumnHeaders.tsx +++ b/src/pages/variantHistory/ColumnHeaders.tsx @@ -44,8 +44,10 @@ const ColumnHeaders: React.FC = ({ if (!taskNamesForBuildVariant) { reportError( new Error("No task names found for build variant") - ).severe(); - dispatchToast.error(`No tasks found for buildVariant: ${variantName}}`); + ).warning(); + dispatchToast.error( + `No tasks found for build variant: ${variantName}}` + ); } }, });