Majority of Dropdown Overlay Menu refactors.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -131,9 +131,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
disabled: existingLayoutKeys.includes(key),
|
||||
}));
|
||||
|
||||
const addComponentOverlay = (
|
||||
<Menu onClick={handleAddComponent} items={menuItems} />
|
||||
);
|
||||
const menu = {items: menuItems, onClick: handleAddComponent};
|
||||
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
@@ -145,7 +143,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
<Button onClick={() => refetch()}>
|
||||
<SyncOutlined />
|
||||
</Button>
|
||||
<Dropdown menu={addComponentOverlay} trigger={["click"]}>
|
||||
<Dropdown menu={menu} trigger={["click"]}>
|
||||
<Button>{t("dashboard.actions.addcomponent")}</Button>
|
||||
</Dropdown>
|
||||
</Space>
|
||||
|
||||
Reference in New Issue
Block a user