Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 39 |
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 DevelopedBy = ({ name, url, repoName, gitUrl, t }) => ( |
||
6 | <div> |
||
7 | {t('Developed by ')} |
||
8 | {url ? ( |
||
9 | <a href={url} target="_blank" rel="noopener noreferrer"> |
||
10 | {name} |
||
11 | </a> |
||
12 | ) : ( |
||
13 | <span>{name}</span> |
||
14 | )} |
||
15 | {t(' with React')} |
||
16 | {gitUrl && ( |
||
17 | <> |
||
18 | {' '} |
||
19 | ( |
||
20 | <a href={gitUrl} target="_blank" rel="noopener noreferrer"> |
||
21 | {repoName || t('repo')} |
||
22 | </a> |
||
23 | ) |
||
24 | </> |
||
25 | )} |
||
26 | {t('.')} |
||
27 | </div> |
||
28 | ) |
||
29 | |||
30 | DevelopedBy.propTypes = { |
||
31 | name: PropTypes.string.isRequired, |
||
32 | url: PropTypes.string, |
||
33 | repoName: PropTypes.string, |
||
34 | gitUrl: PropTypes.string, |
||
35 | t: PropTypes.func.isRequired, |
||
36 | } |
||
37 | |||
38 | export default withTranslation()(DevelopedBy) |
||
39 |