65 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-01-10 16:11:58 +01:00
import styles from './styles.scss';
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 }) {
// eslint-disable-line react/prefer-stateless-function
const staticLinks = [
{
icon: 'book',
label: 'documentation',
destination: 'https://strapi.io/documentation',
},
{
icon: 'question-circle',
label: 'help',
destination: 'https://strapi.io/help',
},
];
2018-04-12 23:45:17 +02:00
return (
<div className={styles.leftMenuFooter}>
2019-01-10 16:11:58 +01:00
<ul className={styles.list}>
{staticLinks.map(link => (
<LeftMenuLink
{...rest}
{...link}
destination={messages[link.label].id}
key={link.label}
/>
))}
2019-01-10 16:11:58 +01:00
</ul>
<div className={styles.poweredBy}>
<FormattedMessage {...messages.poweredBy} key="poweredBy" />
<a key="website" href="https://strapi.io" target="_blank">
2019-04-03 13:18:43 +02:00
Strapi
</a>{' '}
<a
href={`https://github.com/strapi/strapi/releases/tag/v${version}`}
key="github"
target="_blank"
2019-04-03 13:18:43 +02:00
>
v{version}
</a>
2019-01-10 16:11:58 +01:00
</div>
2018-04-12 23:45:17 +02:00
</div>
);
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;