mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 09:00:28 +08:00
Fixed plugin icons not showing up for sidebar
This commit is contained in:
parent
f3cc34d765
commit
12ce145345
@ -23,10 +23,10 @@ import {useMetadata} from "../../hooks/metadataHook";
|
||||
import {faCalendarCheck} from "@fortawesome/free-regular-svg-icons";
|
||||
import {SwitchTransition} from "react-transition-group";
|
||||
import MainPageRedirect from "../../components/navigation/MainPageRedirect";
|
||||
import ExtensionIcon from "../../components/extensions/ExtensionIcon";
|
||||
import {ServerExtensionContextProvider, useServerExtensionContext} from "../../hooks/serverExtensionDataContext";
|
||||
import {useDataRequest} from "../../hooks/dataFetchHook";
|
||||
import {fetchNetworkMetadata} from "../../service/metadataService";
|
||||
import {iconTypeToFontAwesomeClass} from "../../util/icons";
|
||||
|
||||
const NetworkSidebar = () => {
|
||||
const {t, i18n} = useTranslation();
|
||||
@ -89,7 +89,7 @@ const NetworkSidebar = () => {
|
||||
.map(info => {
|
||||
return {
|
||||
name: info.pluginName,
|
||||
icon: <ExtensionIcon icon={info.icon}/>,
|
||||
icon: [iconTypeToFontAwesomeClass(info.icon.family), info.icon.iconName],
|
||||
href: `plugins/${encodeURIComponent(info.pluginName)}`
|
||||
}
|
||||
}).forEach(item => items.push(item))
|
||||
|
@ -27,8 +27,8 @@ import {SwitchTransition} from "react-transition-group";
|
||||
import MainPageRedirect from "../../components/navigation/MainPageRedirect";
|
||||
import {useDataRequest} from "../../hooks/dataFetchHook";
|
||||
import {fetchServerIdentity} from "../../service/serverService";
|
||||
import ExtensionIcon from "../../components/extensions/ExtensionIcon";
|
||||
import {ServerExtensionContextProvider, useServerExtensionContext} from "../../hooks/serverExtensionDataContext";
|
||||
import {iconTypeToFontAwesomeClass} from "../../util/icons";
|
||||
|
||||
const ServerSidebar = () => {
|
||||
const {t, i18n} = useTranslation();
|
||||
@ -87,7 +87,7 @@ const ServerSidebar = () => {
|
||||
.map(info => {
|
||||
return {
|
||||
name: info.pluginName,
|
||||
icon: <ExtensionIcon icon={info.icon}/>,
|
||||
icon: [iconTypeToFontAwesomeClass(info.icon.family), info.icon.iconName],
|
||||
href: `plugins/${encodeURIComponent(info.pluginName)}`
|
||||
}
|
||||
}).forEach(item => items.push(item))
|
||||
|
Loading…
Reference in New Issue
Block a user