From e36bb65e4c6cf661d5637dfce2713a2203fab02f Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Mon, 24 Mar 2025 14:14:24 -0400 Subject: [PATCH] IO-3183-Dependency-Updates-and-maintenance - Cleaning dashboard-grid.component.jsx --- .../components/dashboard-grid/dashboard-grid.component.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/dashboard-grid/dashboard-grid.component.jsx b/client/src/components/dashboard-grid/dashboard-grid.component.jsx index 1fd97ceb1..70800158a 100644 --- a/client/src/components/dashboard-grid/dashboard-grid.component.jsx +++ b/client/src/components/dashboard-grid/dashboard-grid.component.jsx @@ -1,4 +1,5 @@ import Icon, { SyncOutlined } from "@ant-design/icons"; +import { isEmpty, cloneDeep } from "lodash"; import { useMutation, useQuery } from "@apollo/client"; import { Button, Dropdown, Space } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; @@ -19,7 +20,6 @@ import componentList from "./componentList.js"; import createDashboardQuery from "./createDashboardQuery.js"; import "./dashboard-grid.styles.scss"; -import cloneDeep from "lodash/cloneDeep"; const ResponsiveReactGridLayout = WidthProvider(Responsive); @@ -59,8 +59,8 @@ export function DashboardGridComponent({ currentUser, bodyshop }) { layout: { ...state, layout, layouts } } }); - if (!!result.errors) { - notification["error"]({ + if (!isEmpty(result?.errors)) { + notification.error({ message: t("dashboard.errors.updatinglayout", { message: JSON.stringify(result.errors) })