Created
August 29, 2018 03:27
-
-
Save Shuumatsu/274b75acd50c9fd6ee63c32f7401c068 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { STATUSES } from '@/constants' | |
import withUserInformation from '@/hocs/withUserInformation' | |
import { identity } from 'ramda' | |
import { branch, compose, renderComponent } from 'recompose' | |
import LoginPage from '../routes/login' | |
const privateComponent = branch( | |
({ loginStatus }) => loginStatus === STATUSES.SUCCESSED, | |
identity, | |
renderComponent(LoginPage) | |
) | |
export default compose( | |
withUserInformation, | |
privateComponent | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment