Guest User

Untitled

a guest
Dec 17th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. import React from "react";
  2. import TrackStore from "../../stores/TrackStore.js";
  3. import SearchBar from "../widgets/SearchBar.js";
  4. import Soundcloud from "react-soundcloud-widget";
  5. import ReactPlayer from 'react-player';
  6. import Player from "react-soundcloud-player";
  7.  
  8. export default class Layout extends React.Component {
  9. constructor() {
  10. super();
  11. this.state = {
  12. filter: "",
  13. tracks: []
  14. };
  15.  
  16. };
  17.  
  18. async componentDidMount() {
  19. const res = await TrackStore.getAllTracks();
  20. this.setState({tracks: res});
  21. };
  22.  
  23.  
  24. render() {
  25. const tracks = this.state.tracks;
  26. return (
  27. <div>
  28. <h1>SEARCH</h1>
  29. {tracks.map((track, i) => {
  30. let permalink = track.permalink_url;
  31. return (
  32. <ReactPlayer
  33. url={permalink.toString()} />
  34.  
  35. )
  36. })}
  37. </div>
  38.  
  39. );
  40. }
  41. }
  42.  
  43. Unhandled promise rejection TypeError: (0 , _deepmerge2.default) is not a function
  44. at getConfig (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:100:43)
  45. at new ReactPlayer (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:86:223)
  46. at eval (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:294:18)
  47. at measureLifeCyclePerf (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:74:12)
  48. at ReactCompositeComponentWrapper._constructComponentWithoutOwner (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:293:16)
  49. at ReactCompositeComponentWrapper._constructComponent (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:279:21)
  50. at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:187:21)
  51. at Object.mountComponent (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:47:35)
  52. at Object.updateChildren (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:122:51)
  53. at ReactDOMComponent._reconcilerUpdateChildren (eval at <anonymous> (bootstrap 9c0c5ebbc83ce26535e6:700), <anonymous>:210:32)
Add Comment
Please, Sign In to add comment