import './App.scss'; import React from 'react'; import 'bootstrap/dist/css/bootstrap.min.css'; import {Router, Link} from 'react-router-dom'; import createHistory from "history/createBrowserHistory"; //import thunk from 'redux-thunk'; import {Provider, connect} from 'react-redux'; //import {createStore, combineReducers, applyMiddleware} from 'redux'; import { store } from './store/store'; import { actionAllPlaylists, actionUsersPlaylists } from './store/promiseReducer'; import { Header } from './components/header'; import { Main } from './components/Routs'; import {CAllPlaylists} from './components/Playlist'; import {Š”NowPlayingPlayer} from './components/playing'; export let history = createHistory(); store.subscribe(() => console.log(store.getState())); store.getState().auth.token && store.dispatch(actionAllPlaylists()); store.getState().auth.token && store.dispatch(actionUsersPlaylists(store.getState().auth?.user?.id)); // export const CPlaylistById = connect(state => ({playlist: state.promise.plstById?.payload || {}}), )(PlaylistById); export const Aside = ({children}) =>
const CRoutes = connect(state => ({auth : state.auth?.token}))(Main) function App() { return (
{/* {store.auth?.token && <Š”NowPlayingPlayer/>} */}
); } export default App;