File tree 2 files changed +22
-7
lines changed
2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ const App = ({children}) =>
54
54
render (
55
55
< Router history = { browserHistory } >
56
56
< Route path = "/" component = { App } >
57
- < IndexRedirect to = "demos/scratchpad/welcome " />
58
- { Demos }
57
+ < IndexRedirect to = "demos" />
58
+ { Demos /* Put all the demos and a description page at /demos */ }
59
59
</ Route >
60
60
< Route path = '*' component = { NotFound } />
61
61
</ Router > ,
Original file line number Diff line number Diff line change
1
+ 'use strict'
1
2
import React from 'react'
2
- import { Route } from 'react-router'
3
+ import { Route , IndexRedirect , IndexRoute , Link } from 'react-router'
3
4
4
5
import Scratchpad from './scratchpad'
5
6
import Whiteboard from './whiteboard'
6
7
8
+ const Index = ( { children} ) => < div >
9
+ < h1 > Demos!</ h1 >
10
+ < h2 > < Link to = 'demos/scratchpad/welcome' > Scratchpad</ Link > </ h2 >
11
+ < p >
12
+ The scratchpad is the very simplest React/Firebase demo—a text area
13
+ whose content is synced with Firebase.
14
+ </ p >
15
+
16
+ < h2 > < Link to = 'demos/whiteboard/welcome' > Whiteboard</ Link > </ h2 >
17
+ < p >
18
+ The whiteboard demonstrates the < i > journal</ i > pattern, a way to use Firebase
19
+ to synchronize the state of Redux stores on all collaborators machines.
20
+ </ p >
21
+ </ div >
22
+
7
23
export default < Route path = "/demos" component = { ( { children} ) => children } >
8
- < IndexRedirect to = "scratchpad/welcome" />
9
- < Route path = " scratchpad/:title" component = { Scratchpad } />
10
- < Route path = " whiteboard/:title" component = { Whiteboard } />
24
+ < IndexRoute component = { Index } />
25
+ < Route path = ' scratchpad/:title' component = { Scratchpad } />
26
+ < Route path = ' whiteboard/:title' component = { Whiteboard } />
11
27
</ Route >
12
-
You can’t perform that action at this time.
0 commit comments