From c147a722c291dbaf03f423897702b023836c6c5d Mon Sep 17 00:00:00 2001 From: Joshua Israel <65822698+joshri@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:56:43 -0400 Subject: [PATCH] filter out dupe error messages (#3927) --- ui/components/Page.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ui/components/Page.tsx b/ui/components/Page.tsx index 8cf271d336..033a5f4da8 100644 --- a/ui/components/Page.tsx +++ b/ui/components/Page.tsx @@ -7,7 +7,6 @@ import Alert from "./Alert"; import Breadcrumbs, { Breadcrumb } from "./Breadcrumbs"; import Flex from "./Flex"; import LoadingPage from "./LoadingPage"; -import Spacer from "./Spacer"; import UserSettings from "./UserSettings"; export type PageProps = { @@ -59,17 +58,15 @@ const TopToolBar = styled(Flex)` `; export function Errors({ error }) { - const arr = _.isArray(error) ? error : [error]; + const arr = _.isArray(error) ? _.uniqBy(error, (e) => e?.message) : [error]; if (arr[0]) return ( - - + {_.map(arr, (e, i) => ( ))} - ); return null;