import React from 'react' import { Provider } from 'react-redux' import { createHashHistory } from 'history' import { Admin, Resource } from 'react-admin' import dataProvider from './dataProvider' import authProvider from './authProvider' import polyglotI18nProvider from 'ra-i18n-polyglot' import messages from './i18n' import { Layout, Login } 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 { Player, playQueueReducer } from './audioplayer' import { albumViewReducer } from './album/albumState' import customRoutes from './routes' import themeReducer from './personal/themeReducer' import createAdminStore from './store/createAdminStore' const i18nProvider = polyglotI18nProvider( (locale) => (messages[locale] ? messages[locale] : messages.en), localStorage.getItem('locale') || 'en' ) const history = createHashHistory() const App = () => ( {(permissions) => [ , , , , permissions === 'admin' ? ( ) : null, , permissions === 'admin' ? ( ) : ( ), , ]} ) export default App