File tree Expand file tree Collapse file tree 4 files changed +48
-2
lines changed Expand file tree Collapse file tree 4 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+
3
+ export default ( ) => {
4
+ return < div > About Page</ div >
5
+ }
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+
3
+ export default ( ) => {
4
+ return < div > Home Page</ div >
5
+ }
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import { Link } from '@reach/router'
3
+
4
+ export default ( ) => {
5
+ return (
6
+ < nav >
7
+ < Link > Home</ Link >
8
+ < Link > About</ Link >
9
+ </ nav >
10
+ )
11
+ }
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import ReactDOM from 'react-dom'
3
+ import { createGlobalStyle , ThemeProvider } from 'styled-components'
4
+ import { Router } from '@reach/router'
5
+ import Navigation from './Navigation'
6
+ import HomePage from './HomePage'
7
+ import AboutPage from './AboutPage'
3
8
4
- const title = 'Hello React UI Interactions'
9
+ const theme = {
10
+ fontFamily : 'Helvetica Neue'
11
+ }
12
+
13
+ const GlobalStyle = createGlobalStyle `
14
+ body {
15
+ font-family: ${ props => props . theme . fontFamily } ;
16
+ }
17
+ `
5
18
6
- ReactDOM . render ( < div className = 'application' > { title } </ div > , document . getElementById ( 'app' ) )
19
+ ReactDOM . render (
20
+ < ThemeProvider theme = { theme } >
21
+ < React . Fragment >
22
+ < Navigation />
23
+ < Router >
24
+ < HomePage path = '/' />
25
+ < AboutPage path = 'about' />
26
+ </ Router >
27
+ < GlobalStyle />
28
+ </ React . Fragment >
29
+ </ ThemeProvider > ,
30
+ document . getElementById ( 'app' )
31
+ )
7
32
8
33
if ( 'serviceWorker' in navigator ) {
9
34
window . addEventListener ( 'load' , ( ) => {
You can’t perform that action at this time.
0 commit comments