Skip to content

Instantly share code, notes, and snippets.

@iamkevingreen
Created January 27, 2017 20:20
Show Gist options
  • Save iamkevingreen/858cc64b0dacab134b366f9034e4fb6f to your computer and use it in GitHub Desktop.
Save iamkevingreen/858cc64b0dacab134b366f9034e4fb6f to your computer and use it in GitHub Desktop.
import './styles/app.scss'
import { Config } from '../config'
import React, { Component } from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute, hashHistory } from 'react-router'
import AuthService from './utils/AuthService'
import Layout from './Layout'
import Home from './components/pages/Home'
import Login from './components/pages/auth/Login'
const auth = new AuthService(Config.auth.clientId, Config.auth.domain)
render((
<Router history={hashHistory}>
<Route path="/" component={Layout} auth={auth}>
<IndexRoute component={Home} />
<Route path="login" component={Login} />
</Route>
</Router>
), document.getElementById('app'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment