-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
336 additions
and
277 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
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import SongControls from "./component"; | ||
import { connect } from "react-redux"; | ||
|
||
const mapStateToProps = (state) => { | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
albumImage: state.songsReducer.songDetails ? state.songsReducer.songDetails.album.images[0].url : '' | ||
albumImage: state.songsReducer.songDetails | ||
? state.songsReducer.songDetails.album.images[0].url | ||
: "" | ||
}; | ||
|
||
}; | ||
|
||
export default connect(mapStateToProps)(SongControls); |
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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import AlbumList from "./component"; | ||
import { connect } from "react-redux"; | ||
import { bindActionCreators } from "redux"; | ||
import { fetchArtistSongs } from '../../actions/artistActions'; | ||
import { updateHeaderTitle } from '../../actions/uiActions'; | ||
|
||
const mapStateToProps = (state) => { | ||
import { fetchArtistSongs } from "../../actions/artistActions"; | ||
import { updateHeaderTitle } from "../../actions/uiActions"; | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
token: state.tokenReducer.token ? state.tokenReducer.token : '', | ||
artists: state.artistsReducer.artistList ? state.artistsReducer.artistList.artists : '' | ||
token: state.tokenReducer.token ? state.tokenReducer.token : "", | ||
artists: state.artistsReducer.artistList | ||
? state.artistsReducer.artistList.artists | ||
: "" | ||
}; | ||
|
||
}; | ||
|
||
const mapDispatchToProps = (dispatch) => { | ||
|
||
return bindActionCreators({ | ||
fetchArtistSongs, | ||
updateHeaderTitle | ||
}, dispatch); | ||
|
||
const mapDispatchToProps = dispatch => { | ||
return bindActionCreators( | ||
{ | ||
fetchArtistSongs, | ||
updateHeaderTitle | ||
}, | ||
dispatch | ||
); | ||
}; | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(AlbumList); |
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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
import BrowseView from "./component"; | ||
import { connect } from "react-redux"; | ||
import { bindActionCreators } from "redux"; | ||
import { fetchPlaylistSongs, addPlaylistItem } from '../../actions/playlistActions'; | ||
import { updateHeaderTitle } from '../../actions/uiActions'; | ||
|
||
const mapStateToProps = (state) => { | ||
import { | ||
fetchPlaylistSongs, | ||
addPlaylistItem | ||
} from "../../actions/playlistActions"; | ||
import { updateHeaderTitle } from "../../actions/uiActions"; | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
view: state.browseReducer.view, | ||
viewType: state.songsReducer.viewType, | ||
token: state.tokenReducer.token | ||
}; | ||
|
||
}; | ||
|
||
const mapDispatchToProps = (dispatch) => { | ||
|
||
return bindActionCreators({ | ||
fetchPlaylistSongs, | ||
updateHeaderTitle, | ||
addPlaylistItem | ||
}, dispatch); | ||
|
||
const mapDispatchToProps = dispatch => { | ||
return bindActionCreators( | ||
{ | ||
fetchPlaylistSongs, | ||
updateHeaderTitle, | ||
addPlaylistItem | ||
}, | ||
dispatch | ||
); | ||
}; | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(BrowseView); |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from 'react'; | ||
import UserDetails from '../UserDetails'; | ||
import TrackSearch from '../TrackSearch'; | ||
import './Header.css'; | ||
import React from "react"; | ||
import UserDetails from "../UserDetails"; | ||
import TrackSearch from "../TrackSearch"; | ||
import "./Header.css"; | ||
|
||
const Header = () => { | ||
return( | ||
<div className='header'> | ||
return ( | ||
<div className="header"> | ||
<TrackSearch /> | ||
<UserDetails /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Header ; | ||
export default Header; |
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 |
---|---|---|
@@ -1,33 +1,38 @@ | ||
import MainHeader from "./component"; | ||
import { bindActionCreators } from "redux"; | ||
import { connect } from "react-redux"; | ||
import { fetchCategories, fetchNewReleases, fetchFeatured } from '../../actions/browseActions'; | ||
import { updateHeaderTitle } from '../../actions/uiActions'; | ||
import { updateViewType } from '../../actions/songActions'; | ||
|
||
const mapStateToProps = (state) => { | ||
import { | ||
fetchCategories, | ||
fetchNewReleases, | ||
fetchFeatured | ||
} from "../../actions/browseActions"; | ||
import { updateHeaderTitle } from "../../actions/uiActions"; | ||
import { updateViewType } from "../../actions/songActions"; | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
songPaused: state.songsReducer.songPaused, | ||
headerTitle: state.uiReducer.title, | ||
viewType: state.songsReducer.viewType, | ||
playlists: state.playlistReducer.playlists, | ||
artists: state.artistsReducer.artistList ? state.artistsReducer.artistList.artists : [], | ||
artists: state.artistsReducer.artistList | ||
? state.artistsReducer.artistList.artists | ||
: [], | ||
token: state.tokenReducer.token | ||
}; | ||
|
||
}; | ||
|
||
const mapDispatchToProps = (dispatch) => { | ||
|
||
return bindActionCreators({ | ||
fetchCategories, | ||
fetchNewReleases, | ||
updateHeaderTitle, | ||
updateViewType, | ||
fetchFeatured | ||
}, dispatch); | ||
|
||
const mapDispatchToProps = dispatch => { | ||
return bindActionCreators( | ||
{ | ||
fetchCategories, | ||
fetchNewReleases, | ||
updateHeaderTitle, | ||
updateViewType, | ||
fetchFeatured | ||
}, | ||
dispatch | ||
); | ||
}; | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(MainHeader); |
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.