{"size": 882, "ext": "js", "max_stars_repo_path": "src/native/playlists/new-playlist.js", "max_stars_repo_name": "delwiv/youtube-to-audio", "max_stars_repo_stars_event_min_datetime": "2018-04-10T15:00:58.000Z", "max_stars_repo_stars_event_max_datetime": "2018-04-10T15:00:58.000Z", "max_issues_repo_path": "src/native/playlists/new-playlist.js", "max_issues_repo_name": "delwiv/youtube-to-audio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/native/playlists/new-playlist.js", "max_forks_repo_name": "delwiv/youtube-to-audio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.4, "max_line_length": 72, "alphanum_fraction": 0.6258503401}
import Component from 'react-pure-render/component';
import React, { View, PropTypes as T } from 'react-native';
import NewPlaylistMolecule from '../components/molecules/playlists/new';
import * as actions from '../../common/playlists/actions';
import { connect } from 'react-redux';
import { getToken } from '../../common/config/api';

class NewPlaylist extends Component {
    static propTypes = {
        addPlaylist: T.func,
        token: T.string
    };
    constructor() {
        super();
        this.addPlaylist = this.addPlaylist.bind(this);
    }
    addPlaylist(playlist) {
        this.props.addPlaylist({ playlist, token: this.props.token });
    }
    render() {
        return (
            <View>
                <NewPlaylistMolecule addPlaylist={this.addPlaylist} />
            </View>
        );
    }
}

export default connect(getToken, actions)(NewPlaylist);
