71 lines
1.5 KiB
JavaScript
Raw Normal View History

2016-08-26 15:32:44 +02:00
/**
2019-04-03 13:18:43 +02:00
*
* LeftMenuFooter
*
*/
2016-08-26 15:32:44 +02:00
2019-04-03 19:02:19 +02:00
import React from 'react';
2017-08-14 15:22:42 +02:00
import { defineMessages, FormattedMessage } from 'react-intl';
2018-04-12 23:45:17 +02:00
import { PropTypes } from 'prop-types';
import LeftMenuLink from '../LeftMenuLink';
2019-09-17 15:23:29 +02:00
import Wrapper from './Wrapper';
2016-10-13 20:53:33 +02:00
import messages from './messages.json';
2017-08-14 15:22:42 +02:00
defineMessages(messages);
2016-08-26 15:32:44 +02:00
2019-04-03 13:18:43 +02:00
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',
},
];
2019-04-08 19:54:30 +02:00
2018-04-12 23:45:17 +02:00
return (
2019-09-17 15:23:29 +02:00
<Wrapper>
<ul className="list">
{staticLinks.map(link => (
<LeftMenuLink
{...rest}
{...link}
label={messages[link.label].id}
key={link.label}
/>
))}
2019-01-10 16:11:58 +01:00
</ul>
2019-09-17 15:23:29 +02:00
<div className="poweredBy">
<FormattedMessage {...messages.poweredBy} key="poweredBy" />
2019-07-02 08:37:41 +02:00
<a
key="website"
href="https://strapi.io"
target="_blank"
rel="noopener noreferrer"
>
2019-04-03 13:18:43 +02:00
Strapi
2019-04-08 19:54:30 +02:00
</a>
&nbsp;
2019-04-03 13:18:43 +02:00
<a
href={`https://github.com/strapi/strapi/releases/tag/v${version}`}
key="github"
target="_blank"
2019-07-02 08:37:41 +02:00
rel="noopener noreferrer"
2019-04-03 13:18:43 +02:00
>
v{version}
</a>
2019-01-10 16:11:58 +01:00
</div>
2019-09-17 15:23:29 +02:00
</Wrapper>
2018-04-12 23:45:17 +02:00
);
2016-08-26 15:32:44 +02:00
}
2018-04-12 23:45:17 +02:00
LeftMenuFooter.propTypes = {
version: PropTypes.string.isRequired,
};
2019-04-03 19:02:19 +02:00
export default LeftMenuFooter;