src/components/CV/Footer/DevelopedBy.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 39
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 34
mnd 1
bc 1
fnc 0
dl 0
loc 39
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 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