Remove fontawesome icon for plugins link

Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
soupette 2021-11-05 15:09:06 +01:00
parent 58561e4ae9
commit d0090ce89a
6 changed files with 30 additions and 30 deletions

View File

@ -1,7 +1,6 @@
import React, { useRef, useState } from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useIntl } from 'react-intl';
import { NavLink as Link } from 'react-router-dom';
import { Divider } from '@strapi/design-system/Divider';
@ -112,18 +111,22 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
{generalSectionLinks.length > 0 ? (
<NavSection label="General">
{generalSectionLinks.map(link => (
<NavLink
badgeContent={
(link.notificationsCount > 0 && link.notificationsCount.toString()) || undefined
}
to={link.to}
key={link.to}
icon={<FontAwesomeIcon icon={link.icon} />}
>
{formatMessage(link.intlLabel)}
</NavLink>
))}
{generalSectionLinks.map(link => {
const LinkIcon = link.icon;
return (
<NavLink
badgeContent={
(link.notificationsCount > 0 && link.notificationsCount.toString()) || undefined
}
to={link.to}
key={link.to}
icon={<LinkIcon />}
>
{formatMessage(link.intlLabel)}
</NavLink>
);
})}
</NavSection>
) : null}
</NavSections>

View File

@ -1,11 +1,14 @@
/* eslint-disable consistent-return */
import produce from 'immer';
import Cog from '@strapi/icons/Cog';
import Puzzle from '@strapi/icons/Puzzle';
import ShoppingCart from '@strapi/icons/ShoppingCart';
import adminPermissions from '../../permissions';
const initialState = {
generalSectionLinks: [
{
icon: 'list',
icon: Puzzle,
intlLabel: {
id: 'app.components.LeftMenuLinkContainer.listPlugins',
defaultMessage: 'Plugins',
@ -14,7 +17,7 @@ const initialState = {
permissions: adminPermissions.marketplace.main,
},
{
icon: 'shopping-basket',
icon: ShoppingCart,
intlLabel: {
id: 'app.components.LeftMenuLinkContainer.installNewPlugin',
defaultMessage: 'Marketplace',
@ -23,7 +26,7 @@ const initialState = {
permissions: adminPermissions.marketplace.main,
},
{
icon: 'cog',
icon: Cog,
intlLabel: {
id: 'app.components.LeftMenuLinkContainer.settings',
defaultMessage: 'Settings',

View File

@ -5,9 +5,8 @@
*/
import React from 'react';
import { Icon } from '@strapi/design-system/Icon';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Layout from '@strapi/icons/Layout';
const PluginIcon = () => <Icon as={() => <FontAwesomeIcon icon="paint-brush" />} width="16px" />;
const PluginIcon = () => <Layout />;
export default PluginIcon;

View File

@ -5,11 +5,8 @@
*/
import React from 'react';
import { Icon } from '@strapi/design-system/Icon';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Landscape from '@strapi/icons/Landscape';
const PluginIcon = () => (
<Icon as={() => <FontAwesomeIcon icon="cloud-upload-alt" />} width="16px" />
);
const PluginIcon = () => <Landscape />;
export default PluginIcon;

View File

@ -5,9 +5,8 @@
*/
import React from 'react';
import { Icon } from '@strapi/design-system/Icon';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Puzzle from '@strapi/icons/Puzzle';
const PluginIcon = () => <Icon as={() => <FontAwesomeIcon icon="plug" />} width="16px" />;
const PluginIcon = () => <Puzzle />;
export default PluginIcon;

View File

@ -5,9 +5,8 @@
*/
import React from 'react';
import { Icon } from '@strapi/design-system/Icon';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Information from '@strapi/icons/Information';
const PluginIcon = () => <Icon as={() => <FontAwesomeIcon icon="book" />} width="16px" />;
const PluginIcon = () => <Information />;
export default PluginIcon;