File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,14 @@ type Props = {
17
17
}
18
18
19
19
class PodcastView extends React . Component < Props > {
20
+ shouldComponentUpdate ( nextProps : Props ) {
21
+ const curr = this . props
22
+ if ( curr . podcast !== nextProps . podcast ) return true
23
+ return false
24
+ }
25
+
20
26
render ( ) {
21
27
const { podcast, episodes } = this . props
22
-
23
28
return (
24
29
< Grid data-cy = "podcast-view" >
25
30
Original file line number Diff line number Diff line change @@ -9,9 +9,13 @@ type Props = {
9
9
}
10
10
11
11
class PodcastsGrid extends React . Component < Props > {
12
+ shouldComponentUpdate ( nextProps : Props ) {
13
+ const curr = this . props
14
+ if ( curr . podcasts !== nextProps . podcasts ) return true
15
+ return false
16
+ }
12
17
render ( ) {
13
18
const { podcasts } = this . props
14
-
15
19
return (
16
20
< Container >
17
21
< Grid >
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ class Index extends React.Component<Props> {
27
27
28
28
render ( ) {
29
29
const { podcasts } = this . props
30
-
31
30
return (
32
31
< Page dataCy = { 'home-view' } >
33
32
< Head >
You can’t perform that action at this time.
0 commit comments