<commit_before>import cx from 'classnames';
import React from 'react';
import SongTitle from '../SongTitle';
import Eta from './Eta';

export default class NextMedia extends React.Component {
  static propTypes = {
    className: React.PropTypes.string,
    playlist: React.PropTypes.object,
    nextMedia: React.PropTypes.object
  };

  render() {
    const { playlist, nextMedia, className, ...attrs } = this.props;
    if (!playlist || !nextMedia) {
      return (
        <div className={cx('NextMedia', className)}>
          You don't have a playlist yet!
        </div>
      );
    }

    const mediaEl = <SongTitle {...nextMedia} />;
    const playlistEl = <span className="NextMedia-playlist">{playlist.name}</span>;
    const etaEl = <Eta className="NextMedia-eta" />;
    return (
      <div className={cx('NextMedia', className)} {...attrs}>
        {mediaEl} from {playlistEl} in {etaEl}
      </div>
    );
  }
}<commit_msg>footer: fix playlist manager toggle when current playlist is empty<commit_after>import cx from 'classnames';
import React from 'react';
import SongTitle from '../SongTitle';
import Eta from './Eta';

export default class NextMedia extends React.Component {
  static propTypes = {
    className: React.PropTypes.string,
    playlist: React.PropTypes.object,
    nextMedia: React.PropTypes.object
  };

  render() {
    const { playlist, nextMedia, className, ...attrs } = this.props;
    if (!playlist || !nextMedia) {
      return (
        <div className={cx('NextMedia', className)} {...attrs}>
          You don't have a playlist yet!
        </div>
      );
    }

    const mediaEl = <SongTitle {...nextMedia} />;
    const playlistEl = <span className="NextMedia-playlist">{playlist.name}</span>;
    const etaEl = <Eta className="NextMedia-eta" />;
    return (
      <div className={cx('NextMedia', className)} {...attrs}>
        {mediaEl} from {playlistEl} in {etaEl}
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.1462409886714727, 'fraction_numerical': 0.0, 'mean_word_length': 2.9653061224489794, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5204128', 'n_tokens_mistral': 594, 'n_tokens_neox': 582, 'n_words': 158}