import React from 'react' import ReactGA from 'react-ga' import { Provider } from 'react-redux' import { createHashHistory } from 'history' import { Admin, Resource } from 'react-admin' import dataProvider from './dataProvider' import authProvider from './authProvider' import { Layout, Login, Logout } from './layout' import transcoding from './transcoding' import player from './player' import user from './user' import song from './song' import album from './album' import artist from './artist' import playlist from './playlist' import { Player, playQueueReducer } from './audioplayer' import { albumViewReducer } from './album/albumState' import customRoutes from './routes' import themeReducer from './personal/themeReducer' import { addToPlaylistDialogReducer } from './dialogs/dialogState' import createAdminStore from './store/createAdminStore' import { i18nProvider } from './i18n' import config from './config' const history = createHashHistory() if (config.gaTrackingId) { ReactGA.initialize(config.gaTrackingId) history.listen((location) => { ReactGA.pageview(location.pathname) }) ReactGA.pageview(window.location.pathname) } const App = () => ( {(permissions) => [ , , , , permissions === 'admin' ? ( ) : null, , permissions === 'admin' ? ( ) : ( ), , , , , ]} ) export default App