Skip to content

Instantly share code, notes, and snippets.

@karlbright
Created December 4, 2015 01:28
Show Gist options
  • Save karlbright/123d4b332a52eaa546d0 to your computer and use it in GitHub Desktop.
Save karlbright/123d4b332a52eaa546d0 to your computer and use it in GitHub Desktop.
import React from 'react'
import { Route } from 'react-router'
import SchemaFormRoute from './routes/schema-form-route'
import Application from './handlers/Application'
import Example from './handlers/example'
import SimpleExample from './handlers/simple-example'
export default (
<Route path='/' component={Application}>
<Route path='/foo**' component={SimpleExample} />
<SchemaFormRoute path='/bar' component={Example} />
</Route>
)
import React, { Component } from 'react'
import Container from '../components/container'
import Sidebar from '../components/sidebar'
import ContentArea from '../components/content-area'
import SchemaForm from '../containers/schema-form'
import StateView from '../containers/state-view'
import schemaFormPathFromLocation from '../util/schema-form-path-from-location'
export default (props) => {
const schemaFormPath = schemaFormPathFromLocation(props.routeParams)
return (
<Container width={600}>
<Sidebar><SchemaForm path={schemaFormPath} /></Sidebar>
<ContentArea><StateView /></ContentArea>
</Container>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment