diff --git a/public/components/dups/duplicate.js b/public/components/duplicate.js similarity index 100% rename from public/components/dups/duplicate.js rename to public/components/duplicate.js diff --git a/public/components/dups/duplicates-box.js b/public/components/duplicates-box.js similarity index 100% rename from public/components/dups/duplicates-box.js rename to public/components/duplicates-box.js diff --git a/public/components/playlist-box.js b/public/components/playlist-box.js new file mode 100644 index 0000000..4fe0fe9 --- /dev/null +++ b/public/components/playlist-box.js @@ -0,0 +1,39 @@ +'use strict'; +var React = require('react'); +var ReactBootstrap = require('react-bootstrap'); + +var PlaylistBox = React.createClass({ + getInitialState: function () { + return { + currentId: null + }; + }, + clickOnItem: function (id, uid, event) { + event.preventDefault(); + this.setState({currentId: id}); + this.props.handleClick(id, uid); + }, + render: function () { + var ListGroup = ReactBootstrap.ListGroup, + ListGroupItem = ReactBootstrap.ListGroupItem; + var currentId = this.state.currentId; + + var playlists =
No playlist found.
; + if (this.props.playlists) { + playlists = this.props.playlists.map(function (pl) { + var id = pl.id; + return ( +No playlist found.
; - if (this.props.playlists) { - playlists = this.props.playlists.map(function (pl) { - var id = pl.id; - return ( -