| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 18 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | import { compose, branch, renderComponent, renderNothing } from 'recompose'; |
||
| 2 | import { graphql } from 'react-apollo'; |
||
| 3 | import { isEmpty, propOr } from 'ramda'; |
||
| 4 | import { getProfileInfo } from 'services/graphQLQuery'; |
||
| 5 | import ProfileComponent from 'components/ProfileComponent'; |
||
| 6 | |||
| 7 | export default compose( |
||
| 8 | graphql(getProfileInfo, { |
||
| 9 | name: `profile`, |
||
| 10 | }), |
||
| 11 | branch( |
||
| 12 | ({ profile }) => profile.loading || profile.errors || isEmpty(propOr(`user`, profile, null)), |
||
| 13 | renderComponent(renderNothing()), |
||
| 14 | ), |
||
| 15 | )(ProfileComponent); |
||
| 16 |