src/entities/YoutubeVideo/YoutubeVideo.tsx
last analyzed

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 27
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 22
mnd 0
bc 0
fnc 0
dl 0
loc 27
bpm 0
cpm 0
noi 20
c 0
b 0
f 0
1
import { RefObject } from 'react'
0 ignored issues
show
introduced by
'RefObject' is defined but never used.
Loading history...
2
3
import styles from './YoutubeVideo.module.scss'
4
5
interface IYoutubeVideo {
6
  embedId: string
7
  title: string
8
}
9
10
const YoutubeVideo = ({ embedId, title = 'Youtube video' }: IYoutubeVideo) => (
0 ignored issues
show
introduced by
Function component is not a function declaration
Loading history...
11
  <div style={{ width: '100%' }}>
0 ignored issues
show
introduced by
Expected indentation of 4 space characters but found 2.
Loading history...
introduced by
JSX not allowed in files with extension '.tsx'
Loading history...
introduced by
JSX attribute values should not contain objects created in the same scope
Loading history...
12
    <div className={styles.responsiveVideo}>
0 ignored issues
show
introduced by
Expected indentation of 6 space characters but found 4.
Loading history...
13
      <iframe
0 ignored issues
show
introduced by
Expected indentation of 8 space characters but found 6.
Loading history...
14
        width="853"
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
15
        height="480"
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
introduced by
Props should be sorted alphabetically
Loading history...
16
        src={`https://www.youtube.com/embed/${embedId}`}
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
introduced by
Props should be sorted alphabetically
Loading history...
17
        frameBorder="0"
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
introduced by
Props should be sorted alphabetically
Loading history...
18
        allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
introduced by
Props should be sorted alphabetically
Loading history...
19
        allowFullScreen
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
introduced by
Props should be sorted alphabetically
Loading history...
20
        title={title}
0 ignored issues
show
introduced by
Expected indentation of 10 space characters but found 8.
Loading history...
introduced by
Props should be sorted alphabetically
Loading history...
21
      />
22
    </div>
23
  </div>
24
)
25
26
export { YoutubeVideo }
27