Plugins: Use the includes.path (if exists) on sidebar includes links (#30291)

This commit is contained in:
Joan López de la Franca Beltran
2021-01-15 00:12:08 +01:00
committed by GitHub
parent 60828316c0
commit ce3e34e9b3

View File

@@ -212,8 +212,9 @@ class PluginPage extends PureComponent<Props, State> {
if (item.type === PluginIncludeType.page) {
const pluginId = this.state.plugin!.meta.id;
const page = item.name.toLowerCase().replace(' ', '-');
const url = item.path ?? `plugins/${pluginId}/page/${page}`;
return (
<a href={`plugins/${pluginId}/page/${page}`}>
<a href={url}>
<i className={getPluginIcon(item.type)} />
{item.name}
</a>