Skip to content

Commit

Permalink
fix: remove unused props (#280)
Browse files Browse the repository at this point in the history
After moving isPlayingAdOrPlayback to act as a store getter, there are props left which are not needed anymore in certain components.
  • Loading branch information
Dan Ziv committed Oct 14, 2018
1 parent 72357a3 commit d31d0aa
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/components/keyboard/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import {isPlayingAdOrPlayback} from '../../reducers/getters';
const mapStateToProps = state => ({
isPlayingAdOrPlayback: isPlayingAdOrPlayback(state.engine),
playerNav: state.shell.playerNav,
isPlaying: state.engine.isPlaying,
isEnded: state.engine.isEnded,
adBreak: state.engine.adBreak,
adIsPlaying: state.engine.adIsPlaying,
textTracks: state.engine.textTracks
});

Expand Down
6 changes: 1 addition & 5 deletions src/components/overlay-action/overlay-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ import {isPlayingAdOrPlayback} from '../../reducers/getters';
const mapStateToProps = state => ({
isPlayingAdOrPlayback: isPlayingAdOrPlayback(state.engine),
iconType: state.overlayAction.iconType,
isPlaying: state.engine.isPlaying,
adBreak: state.engine.adBreak,
adIsPlaying: state.engine.adIsPlaying,
playerHover: state.shell.playerHover,
isMobile: state.shell.isMobile,
isEnded: state.engine.isEnded
isMobile: state.shell.isMobile
});

/**
Expand Down
1 change: 0 additions & 1 deletion src/components/play-pause/play-pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const mapStateToProps = state => ({
isPlayingAdOrPlayback: isPlayingAdOrPlayback(state.engine),
isPlaying: state.engine.isPlaying,
adBreak: state.engine.adBreak,
adIsPlaying: state.engine.adIsPlaying,
isEnded: state.engine.isEnded
});

Expand Down
6 changes: 1 addition & 5 deletions src/components/unmute-indication/unmute-indication.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ export const MUTED_AUTOPLAY_ICON_ONLY_DEFAULT_TIMEOUT = 3000;
*/
const mapStateToProps = state => ({
isPlayingAdOrPlayback: isPlayingAdOrPlayback(state.engine),
fallbackToMutedAutoPlay: state.engine.fallbackToMutedAutoPlay,
isPlaying: state.engine.isPlaying,
adBreak: state.engine.adBreak,
adIsPlaying: state.engine.adIsPlaying,
isEnded: state.engine.isEnded
fallbackToMutedAutoPlay: state.engine.fallbackToMutedAutoPlay
});

@connect(
Expand Down

0 comments on commit d31d0aa

Please sign in to comment.