soupette f50f89f0a8 Update eslint configuration
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-01-21 16:03:31 +01:00

71 lines
1.5 KiB
JavaScript

/**
*
* LeftMenuFooter
*
*/
import React from 'react';
import { defineMessages, FormattedMessage } from 'react-intl';
import { PropTypes } from 'prop-types';
import LeftMenuLink from '../LeftMenuLink';
import Wrapper from './Wrapper';
import messages from './messages.json';
defineMessages(messages);
function LeftMenuFooter({ version, ...rest }) {
const staticLinks = [
{
icon: 'book',
label: 'documentation',
destination: 'https://strapi.io/documentation',
},
{
icon: 'question-circle',
label: 'help',
destination: 'https://strapi.io/help',
},
];
return (
<Wrapper>
<ul className="list">
{staticLinks.map(link => (
<LeftMenuLink
{...rest}
{...link}
label={messages[link.label].id}
key={link.label}
/>
))}
</ul>
<div className="poweredBy">
<FormattedMessage {...messages.poweredBy} key="poweredBy" />
<a
key="website"
href="https://strapi.io"
target="_blank"
rel="noopener noreferrer"
>
Strapi
</a>
&nbsp;
<a
href={`https://github.com/strapi/strapi/releases/tag/v${version}`}
key="github"
target="_blank"
rel="noopener noreferrer"
>
v{version}
</a>
</div>
</Wrapper>
);
}
LeftMenuFooter.propTypes = {
version: PropTypes.string.isRequired,
};
export default LeftMenuFooter;