56 lines
1.3 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 13:18:43 +02:00
import React, { memo } 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
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}>
<LeftMenuLink
2019-04-03 13:18:43 +02:00
{...rest}
icon='book'
2019-01-10 16:11:58 +01:00
label={messages.documentation.id}
2019-04-03 13:18:43 +02:00
destination='https://strapi.io/documentation'
2019-01-10 16:11:58 +01:00
/>
<LeftMenuLink
2019-04-03 13:18:43 +02:00
{...rest}
icon='question-circle'
2019-01-10 16:11:58 +01:00
label={messages.help.id}
2019-04-03 13:18:43 +02:00
destination='https://strapi.io/help'
2019-01-10 16:11:58 +01:00
/>
</ul>
<div className={styles.poweredBy}>
<FormattedMessage {...messages.poweredBy} />
2019-04-03 13:18:43 +02:00
<a href='https://strapi.io' target='_blank'>
Strapi
</a>{' '}
<a
href={`https://github.com/strapi/strapi/releases/tag/v${version}`}
target='_blank'
>
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 13:18:43 +02:00
export default memo(LeftMenuFooter);