import React, {useState, useEffect} from 'react'; import {Link} from 'react-router-dom'; import {Provider, connect} from 'react-redux'; import { actionUsersPlaylists } from '../store/promiseReducer'; import { actionFullSetPlaylist } from '../store/playerReducer'; import { store } from '../store/store'; import image from '../images/card.png'; import Modal from 'react-bootstrap/Modal'; import Button from 'react-bootstrap/Button'; import {CreatePlaylist} from './createPlaylist' import { Header } from './header'; // function sendForm (url, data) { // fetch(`http://player-api/api/${url}`, { // method: 'POST', // body: data, // headers: { // ...(localStorage.authToken ? {"Authorization": "Bearer " + localStorage.authToken} : {}) // }, // }).then(res => res.json()) // .then(data => { // if(data.token) { // console.log(data) // return data // } else { // //console.log(data.login[0]); // } // }) // } const Playlist = ({playlist: {id, user_id, name, photo, description} = {}}) =>
{description? description : '.' }