This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const initialState = { | |
isLoading: true, | |
user: null | |
} | |
export default function usersReducer(state = initialState, action) { | |
switch (action.type) { | |
case 'LOGIN': | |
return { | |
...state, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import App from './App.jsx'; | |
import 'bulma/css/bulma.css'; | |
import './stylesheets/index.css'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Switch, Route, withRouter } from 'react-router-dom'; | |
import { connect } from 'react-redux'; | |
import Login from './user/containers/Login'; | |
import Register from './user/containers/Register'; | |
import Header from './app/componets/Header'; | |
import AdminDashboard from './admin/containers/AdminDashboard'; | |
import UserDashboard from './user/containers/UserDashboard'; |
OlderNewer