fix: create collections button issue on clicking Collections tab in REST API (#5992)

This commit is contained in:
Katherine 2025-01-07 10:50:13 +08:00 committed by GitHub
parent b4ed765317
commit dbd40f74cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,7 +196,10 @@ export const AdminSettingsLayout = () => {
<Menu <Menu
style={{ marginLeft: -theme.margin }} style={{ marginLeft: -theme.margin }}
onClick={({ key }) => { onClick={({ key }) => {
navigate(replaceRouteParams(app.pluginSettingsManager.getRoutePath(key), params)); const targetPath = replaceRouteParams(app.pluginSettingsManager.getRoutePath(key), params);
if (location.pathname !== targetPath) {
navigate(targetPath);
}
}} }}
selectedKeys={[currentSetting?.name]} selectedKeys={[currentSetting?.name]}
mode="horizontal" mode="horizontal"