From 17ccdee9abd3df84e2205493f19468e1001efc05 Mon Sep 17 00:00:00 2001 From: Junyi Date: Fri, 26 May 2023 08:54:06 +0700 Subject: [PATCH] fix(client): fix some warnings (#1934) * fix(client): fix some warnings * fix(client): fix warning --- .../core/client/src/pm/PluginManagerLink.tsx | 41 ++++++--------- .../antd/action/Action.Designer.tsx | 26 +++++----- .../antd/action/Action.Drawer.tsx | 2 +- .../schema-component/antd/action/Action.tsx | 4 +- .../antd/filter/FilterAction.tsx | 4 +- .../antd/icon-picker/IconPicker.tsx | 4 +- .../antd/input/EllipsisWithTooltip.tsx | 4 +- .../common/sortable-item/SortableItem.tsx | 12 +++-- .../components/AsDefaultTemplate.tsx | 2 +- .../src/schema-settings/SchemaSettings.tsx | 4 +- .../client/src/settings-form/SettingsForm.tsx | 4 +- packages/core/client/src/user/CurrentUser.tsx | 4 +- .../plugins/import/src/client/ImportModal.tsx | 2 +- .../multi-app-manager/src/client/index.tsx | 52 ++++++++----------- 14 files changed, 78 insertions(+), 87 deletions(-) diff --git a/packages/core/client/src/pm/PluginManagerLink.tsx b/packages/core/client/src/pm/PluginManagerLink.tsx index 47bb7deec..60b0dd529 100644 --- a/packages/core/client/src/pm/PluginManagerLink.tsx +++ b/packages/core/client/src/pm/PluginManagerLink.tsx @@ -46,31 +46,22 @@ export const SettingsCenterDropdown = () => { - {bookmarkTabs.map((tab) => { - return ( - { - history.push('/admin/settings/' + tab.path); - }} - key={tab.path} - > - {compile(tab.title)} - - ); - })} - - { - history.push('/admin/settings'); - }} - key="/admin/settings" - > - {t('All plugin settings')} - - - } + menu={{ + items: [ + ...bookmarkTabs.map((tab) => ({ + key: `/admin/settings/${tab.path}`, + label: compile(tab.title), + })), + { type: 'divider' }, + { + key: '/admin/settings', + label: t('All plugin settings'), + }, + ], + onClick({ key }) { + history.push(key); + }, + }} >