Skip to content

Instantly share code, notes, and snippets.

@radzserg
Last active July 10, 2019 09:37
Show Gist options
  • Select an option

  • Save radzserg/7cd06bb2c853e72aac21c12c69442fb2 to your computer and use it in GitHub Desktop.

Select an option

Save radzserg/7cd06bb2c853e72aac21c12c69442fb2 to your computer and use it in GitHub Desktop.
export default
@withCookies
@withRouter
@connect(
state => {
return {
token: state.auth.token,
currentUser: state.auth.currentUser
};
},
dispatch => ({
dispatch
})
)
@graphql(meGql, {
props: ({ data: { loading, me, error } }) => ({
userLoading: loading,
errorCurrentUser: error,
currentUser: me
})
})
class CurrentUser extends Component {
// now TEST me cowboy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment