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

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 26
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 22
mnd 1
bc 1
fnc 0
dl 0
loc 26
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 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