Skip to content

Commit

Permalink
Merge pull request nukeop#209 from aayushchhabra/master
Browse files Browse the repository at this point in the history
Add ability to click on artist name in the down-left corner
  • Loading branch information
nukeop authored Jan 30, 2019
2 parents b722f33 + c274eee commit 2da156d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class App extends React.Component {
<TrackInfo
track={this.getCurrentSongParameter('name')}
artist={this.getCurrentSongParameter('artist')}
artistInfoSearchByName={this.props.actions.artistInfoSearchByName}
history={this.props.history}
/>
);
}
Expand Down
17 changes: 15 additions & 2 deletions app/components/TrackInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@ import styles from './styles.scss';
class TrackInfo extends React.Component {

render() {
let {
track,
artist,
artistInfoSearchByName,
history
} = this.props;
return (
<div className={styles.track_info_container}>
<div className={styles.track_name}>{this.props.track}</div>
<div className={styles.artist_name}>{this.props.artist}</div>
<div className={styles.track_name}>{track}</div>
<a
onClick={() => artistInfoSearchByName(artist, history)}
href='#'
>
<div className={styles.artist_name}>
{artist}
</div>
</a>
</div>
);
}
Expand Down
6 changes: 5 additions & 1 deletion app/components/TrackInfo/styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '../../vars';
.track_info_container {
display: flex 1;
margin: 10px 20px;
Expand All @@ -16,7 +17,10 @@
}

.artist_name {
color: rgba(248, 248, 242, 0.5);
color: $lightbg;
&:hover {
color: $white;
}
font-size: 16px;
flex: 1 1 auto;
overflow: hidden;
Expand Down

0 comments on commit 2da156d

Please sign in to comment.