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) })