Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Mar 29, 2020
1 parent 883f544 commit 310ae2c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
40 changes: 18 additions & 22 deletions packages/ui/lib/components/QueueItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,23 @@ import styles from './styles.scss';

import artPlaceholder from '../../../resources/media/art_placeholder.png';

export const QueueItem = props => {
let {
isLoading,
isCurrent,
isCompact,
track,
duration,
error,
export const QueueItem = ({
isLoading,
isCurrent,
isCompact,
track,
duration,
error,

handleRemoveFromQueue,
handleSelectSong
} = props;

return (
handleRemoveFromQueue,
handleSelectSong
}) => (
<div
className={cx(
common.nuclear,
styles.queue_item,
{[`${styles.current_song}`]: isCurrent},
{[`${styles.compact}`]: isCompact}
{ [`${styles.current_song}`]: isCurrent },
{ [`${styles.compact}`]: isCompact }
)}
onDoubleClick={handleSelectSong}
>
Expand All @@ -45,7 +42,7 @@ export const QueueItem = props => {
className={styles.thumbnail_overlay}
onClick={handleRemoveFromQueue}
>
<Icon name='trash alternate outline' size={isCompact?'large':'big'} />
<Icon name='trash alternate outline' size={isCompact ? 'large' : 'big'} />
</div>
</div>

Expand All @@ -60,7 +57,7 @@ export const QueueItem = props => {

<div className={styles.item_duration_container}>
<div className={styles.item_duration}>
{ duration }
{duration}
</div>
</div>

Expand All @@ -73,7 +70,6 @@ export const QueueItem = props => {
}
</div>
);
};

QueueItem.propTypes = {
isLoading: PropTypes.bool,
Expand Down Expand Up @@ -101,13 +97,13 @@ QueueItem.propTypes = {

export const enhance = compose(
withHandlers({
handleRemoveFromQueue: ({removeFromQueue, track, resetPlayer, sendPaused}) => () => {
handleRemoveFromQueue: ({ removeFromQueue, track, resetPlayer, sendPaused }) => () => {
removeFromQueue(track);
if (resetPlayer) {
resetPlayer(sendPaused);
if (resetPlayer) {
resetPlayer(sendPaused);
}
},
handleSelectSong: ({selectSong, index}) => () => selectSong(index)
handleSelectSong: ({ selectSong, index }) => () => selectSong(index)
})
);

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/lib/components/Seekbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import styles from './styles.scss';

const handleClick = (seek, queue) => {
return event => {
let percent = (event.pageX - event.target.offsetLeft)/document.body.clientWidth;
let duration = queue.queueItems[queue.currentSong].streams[0].duration;
const percent = (event.pageX - event.target.offsetLeft)/document.body.clientWidth;
const duration = queue.queueItems[queue.currentSong].streams[0].duration;
seek(percent * duration * 1000);
};
};
Expand Down

0 comments on commit 310ae2c

Please sign in to comment.