File tree 2 files changed +30
-6
lines changed
2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,7 @@ import NotFound from './components/NotFound'
8
8
9
9
import firebase from 'APP/fire'
10
10
11
- // -- // Demo components // -- //
12
- import Scratchpad from 'APP/demos/scratchpad'
13
- import Whiteboard from 'APP/demos/whiteboard'
11
+ import Demos from 'APP/demos'
14
12
15
13
// Get the auth API from Firebase.
16
14
const auth = firebase . auth ( )
@@ -56,9 +54,8 @@ const App = ({children}) =>
56
54
render (
57
55
< Router history = { browserHistory } >
58
56
< Route path = "/" component = { App } >
59
- < IndexRedirect to = "scratchpad/welcome" />
60
- < Route path = "scratchpad/:title" component = { Scratchpad } />
61
- < Route path = "whiteboard/:title" component = { Whiteboard } />
57
+ < IndexRedirect to = "demos" />
58
+ { Demos /* Put all the demos and a description page at /demos */ }
62
59
</ Route >
63
60
< Route path = '*' component = { NotFound } />
64
61
</ Router > ,
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+ import React from 'react'
3
+ import { Route , IndexRedirect , IndexRoute , Link } from 'react-router'
4
+
5
+ import Scratchpad from './scratchpad'
6
+ import Whiteboard from './whiteboard'
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
+
23
+ export default < Route path = "/demos" component = { ( { children} ) => children } >
24
+ < IndexRoute component = { Index } />
25
+ < Route path = 'scratchpad/:title' component = { Scratchpad } />
26
+ < Route path = 'whiteboard/:title' component = { Whiteboard } />
27
+ </ Route >
You can’t perform that action at this time.
0 commit comments