Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 26 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import React from 'react' |
||
2 | import PropTypes from 'prop-types' |
||
3 | import { withTranslation } from 'react-i18next' |
||
4 | |||
5 | const DesignedBy = ({ name, url, t }) => ( |
||
6 | <div> |
||
7 | {t('Designed by ')} |
||
8 | {url ? ( |
||
9 | <a href={url} target="_blank" rel="noopener noreferrer"> |
||
10 | {name} |
||
11 | </a> |
||
12 | ) : ( |
||
13 | <span>{name}</span> |
||
14 | )} |
||
15 | {t('.')} |
||
16 | </div> |
||
17 | ) |
||
18 | |||
19 | DesignedBy.propTypes = { |
||
20 | name: PropTypes.string.isRequired, |
||
21 | url: PropTypes.string, |
||
22 | t: PropTypes.func.isRequired, |
||
23 | } |
||
24 | |||
25 | export default withTranslation()(DesignedBy) |
||
26 |