IO-3183-Dependency-Updates-and-maintenance - Cleaning dashboard-grid.component.jsx
This commit is contained in:
@@ -59,6 +59,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
layout: { ...state, layout, layouts }
|
||||
}
|
||||
});
|
||||
|
||||
if (!isEmpty(result?.errors)) {
|
||||
notification.error({
|
||||
message: t("dashboard.errors.updatinglayout", {
|
||||
@@ -67,6 +68,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleRemoveComponent = (key) => {
|
||||
logImEXEvent("dashboard_remove_component", { name: key });
|
||||
const idxToRemove = state.items.findIndex((i) => i.i === key);
|
||||
@@ -95,6 +97,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
};
|
||||
|
||||
const dashboardData = useMemo(() => GenerateDashboardData(data), [data]);
|
||||
|
||||
const existingLayoutKeys = state.items.map((i) => i.i);
|
||||
|
||||
const menuItems = Object.keys(componentList).map((key) => ({
|
||||
@@ -130,7 +133,6 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
width="100%"
|
||||
layouts={state.layouts}
|
||||
onLayoutChange={handleLayoutChange}
|
||||
// onBreakpointChange={onBreakpointChange}
|
||||
>
|
||||
{state.items.map((item, index) => {
|
||||
const TheComponent = componentList[item.i].component;
|
||||
|
||||
Reference in New Issue
Block a user