import React from 'react';
import {
  Router,
  Route,
  IndexRoute,
  hashHistory,
  Redirect,
} from 'react-router';

import ErrorPage from './pages/ErrorPage';
import Home from './pages/Home';
import LogIn from './pages/LogIn';

import LoginStore, {AuthCheck, UserWrapper} from 'stores/LoginStore';

function createElement(Component, props) {
  return <UserWrapper Component={Component} {...props}/>;
}

export const routes = (
  <Router history={hashHistory} createElement={createElement}>
    <Route path="/" component={Master} onEnter={AuthCheck}>
      <Route path="login" component={LogIn}/>
      <IndexRoute component={Home}/>
      <Route path="*" component={ErrorPage}/>
    </Route>
  </Router>
);

@@ -199,17 +199,17 @@
 port Log
-I
+i
 n from '
@@ -219,17 +219,17 @@
 ages/Log
-I
+i
 n';%0A%0Aimp
@@ -587,17 +587,17 @@
 ent=%7BLog
-I
+i
 n%7D/%3E%0A   

Use Login