File tree Expand file tree Collapse file tree 6 files changed +5
-135
lines changed Expand file tree Collapse file tree 6 files changed +5
-135
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import TableOfContents from './TableOfContents'
8
8
import Section from './Section'
9
9
import CurrentUser from './CurrentUser'
10
10
import Profile from './Profile'
11
- import Reviews from './Reviews'
12
11
13
12
const Book = ( { user } ) => (
14
13
< div >
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ class Section extends Component {
22
22
}
23
23
24
24
componentDidMount ( ) {
25
- this . viewedSection ( get ( this , 'props.section.id' ) )
25
+ if ( this . props . section ) {
26
+ this . viewedSection ( this . props . section . id )
27
+ }
26
28
}
27
29
28
30
componentDidUpdate ( prevProps ) {
Original file line number Diff line number Diff line change @@ -2,25 +2,16 @@ import React from 'react'
2
2
import ReactDOM from 'react-dom'
3
3
import { ApolloProvider } from 'react-apollo'
4
4
import { BrowserRouter } from 'react-router-dom'
5
- import { MuiThemeProvider , createMuiTheme } from 'material-ui/styles'
6
5
7
6
import './index.css'
8
7
import registerServiceWorker from './registerServiceWorker'
9
8
import App from './components/App'
10
9
import { apollo } from './lib/apollo'
11
10
12
- const GRAPHQL_PINK = '#e10098'
13
-
14
- const theme = createMuiTheme ( {
15
- palette : { primary : { main : GRAPHQL_PINK } }
16
- } )
17
-
18
11
ReactDOM . render (
19
12
< BrowserRouter >
20
13
< ApolloProvider client = { apollo } >
21
- < MuiThemeProvider theme = { theme } >
22
- < App />
23
- </ MuiThemeProvider >
14
+ < App />
24
15
</ ApolloProvider >
25
16
</ BrowserRouter > ,
26
17
document . getElementById ( 'root' )
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ import { getMainDefinition } from 'apollo-utilities'
7
7
import { setContext } from 'apollo-link-context'
8
8
import { getAuthToken } from 'auth0-helpers'
9
9
10
- import { errorLink } from './errorLink'
11
-
12
10
const httpLink = createHttpLink ( {
13
11
uri : 'https://api.graphql.guide/graphql'
14
12
} )
@@ -39,7 +37,7 @@ const wsLink = new WebSocketLink({
39
37
}
40
38
} )
41
39
42
- const networkLink = split (
40
+ const link = split (
43
41
( { query } ) => {
44
42
const { kind, operation } = getMainDefinition ( query )
45
43
return kind === 'OperationDefinition' && operation === 'subscription'
@@ -48,8 +46,6 @@ const networkLink = split(
48
46
authedHttpLink
49
47
)
50
48
51
- const link = errorLink . concat ( networkLink )
52
-
53
49
const cache = new InMemoryCache ( )
54
50
55
51
export const apollo = new ApolloClient ( { link, cache } )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ export const USER_QUERY = gql`
10
10
email
11
11
photo
12
12
hasPurchased
13
- favoriteReviews {
14
- id
15
- }
16
13
}
17
14
}
18
15
`
You can’t perform that action at this time.
0 commit comments