import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import * as serviceWorker from './serviceWorker';
import {createStore} from "redux"
import {Provider} from "react-redux"
import rootReducer from "./store/reducers"
const store = createStore(rootReducer);
ReactDOM.render( <Provider store={store}><App /></Provider> , document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.register();
import React from 'react';
import './App.css';
import "./css/style.css";
import { connect } from 'react-redux';
import AuthContainer from "./components/Auth/AuthContainer";
function App({isLogged}) {
return (
<div className="container">
{/*<AuthContainer/>*/}
{ isLogged
? <AuthContainer/>
: null
}
</div>
);
}
function mapStateToProps (state) {
return {
isLogged: state.auth.state.isLogged
}
}
export default connect()(App);