import {Router, Route, Redirect, Switch} from 'react-router-dom'; import { history } from '../App'; import {LoginForm} from './authorization'; import {CRegisterForm} from './authRegistration'; import { store } from '../store/store'; import { ToastNotify } from './Toast'; import { CUserPage } from '../pages/userPage'; import {CPlaylistById} from './playlistById'; import {Š”NowPlayingPlayer} from './playing' import { CEditProfile } from './EditProfile'; import { Header } from './header'; import { CArtistPage } from '../pages/artistPage'; import { CAlbumPage } from '../pages/albumPage'; import { CSearchPage } from '../pages/searchPage'; import { AllPlaylistsPage } from '../pages/allPlaylistsPage'; export const Main = ({auth}) =>
{auth && } {auth && } {!auth && } {!auth && } {!auth && } {!auth && } {!auth && } {!auth && } {!auth && } {auth ? : }
const Content = ({children}) => <> {store.getState().auth?.token &&
}
{children}
{store.getState().auth?.token && <Š”NowPlayingPlayer className='col-5'/>}