diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-05-11 12:31:49 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-05-11 12:31:49 -0400 |
| commit | d3838ccb799cd8c286efcea90d776e8b6936d484 (patch) | |
| tree | 4430ea2ada80b1fefb057adfce91867484be7475 /frontend/components | |
| parent | 8ccb0d93cdc064776454c929e15aa03129be37a3 (diff) | |
move apollo to _app
Diffstat (limited to 'frontend/components')
| -rw-r--r-- | frontend/components/Page.js | 2 | ||||
| -rw-r--r-- | frontend/components/Signin.js | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/frontend/components/Page.js b/frontend/components/Page.js index c6601f6..179c0ab 100644 --- a/frontend/components/Page.js +++ b/frontend/components/Page.js @@ -55,6 +55,8 @@ class Page extends React.Component { }; componentDidMount() { // The first time we load in the client, we need to refetch the current user data + // TODO use ApolloContext API here instead + // TODO can we just use _app for this? if (typeof window !== 'undefined' && !window.__CLIENTLOADED__) { client.query({ query: CURRENT_USER_QUERY, fetchPolicy: 'network-only' }); window.__CLIENTLOADED__ = true; diff --git a/frontend/components/Signin.js b/frontend/components/Signin.js index 77acc47..868b819 100644 --- a/frontend/components/Signin.js +++ b/frontend/components/Signin.js @@ -23,7 +23,6 @@ class Signin extends Component { }; render() { - // TODO / ASK - do I really have to wrap this in a query just to access the refetch function return ( <ApolloConsumer> {client => ( |
