Migrate deprecated ant design APIs

Rename visible to open and use menu instead of overlay in Dropdown as
both of these have been removed in the next major version of Antd.
This commit is contained in:
Hornwitser committed 2023-07-27 13:42:35 +02:00
1 parent 2de029b96e
commit a1c9bc5f9b
12 files changed
+81 -85

No files matched your search

@@ -126,9 +126,9 @@ export default function InstanceViewPage(props) {
label: "Delete",
});
}
let instanceButtonsMenu = <Menu
items={instanceButtonMenuItems}
onClick={({ key }) => {
let instanceButtonsMenuProps = {
items: instanceButtonMenuItems,
onClick: ({ key }) => {
if (key === "export") {
setExportingData(true);
control.sendTo(
@@ -167,8 +167,8 @@ export default function InstanceViewPage(props) {
},
});
}
}}
/>;
},
};
let instanceButtons = <Space>
{
account.hasAnyPermission("core.instance.start", "core.instance.stop")
@@ -180,7 +180,7 @@ export default function InstanceViewPage(props) {
"core.instance.extract_players",
"core.instance.kill",
"core.instance.delete",
) && <Dropdown placement="bottomRight" trigger={["click"]} overlay={instanceButtonsMenu}>
) && <Dropdown placement="bottomRight" trigger={["click"]} menu={instanceButtonsMenuProps}>
<Button>More <DownOutlined /></Button>
</Dropdown>}
</Space>;