-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from dmtrKovalenko/Layout-refactoring
Layout refactoring
- Loading branch information
Showing
27 changed files
with
180 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react' | ||
import Player from './Player/PlayerContainer' | ||
import PlayerControls from './PlayerControls/PlayerControlsContainer' | ||
import Navbar from './Navbar/NavbarContainer' | ||
import '../../styles/core.scss' | ||
|
||
export const CoreLayout = (props) => ( | ||
<div className='app'> | ||
<Navbar router={props.router} /> | ||
|
||
<div className='main-content'> | ||
{props.children} | ||
</div> | ||
|
||
<PlayerControls /> | ||
<Player /> | ||
</div> | ||
) | ||
|
||
CoreLayout.propTypes = { | ||
children : React.PropTypes.element.isRequired | ||
} | ||
|
||
export default CoreLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { connect } from 'react-redux' | ||
import * as actions from '../../../player-module/player-actions' | ||
|
||
import Navbar from './components/Navbar' | ||
|
||
const mapDispatchToProps = { | ||
changeFilter: actions.changeFilter | ||
} | ||
|
||
const mapStateToProps = (state) => ({ | ||
filter: state.player.filter | ||
}) | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(Navbar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react' | ||
import StickyNav from './StickyNav/StickyNavBar' | ||
import SearchBar from './StickyNav/SearchBar' | ||
|
||
const Navbar = props => { | ||
return ( | ||
<StickyNav> | ||
<SearchBar router={props.router} | ||
filter={props.filter} | ||
changeFilter={props.changeFilter} /> | ||
</StickyNav> | ||
) | ||
} | ||
|
||
export default Navbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { connect } from 'react-redux' | ||
import * as actions from '../../../player-module/player-actions' | ||
|
||
import PlayerComponent from './components/Player' | ||
|
||
const mapDispatchToProps = { | ||
playPause : (isPaused) => isPaused ? actions.play() : actions.pause(), | ||
changePlaybackTime : actions.changePlaybackTime, | ||
playbackEnded: actions.playbackEnded, | ||
changeVolume : actions.changeVolume | ||
} | ||
|
||
const mapStateToProps = (state) => ({ | ||
currentStreamUrl: state.player.currentStreamUrl, | ||
isPaused : state.player.isPaused, | ||
volume : state.player.volume, | ||
isSeeking: state.player.isSeeking, | ||
playbackTime: state.player.playbackTime | ||
}) | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(PlayerComponent) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nents/ControlsComponents/PlayPauseIcon.js → ...layerControls/components/PlayPauseIcon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.