-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(app): removed logout button when not signed in (#1098)
- Loading branch information
Maurice Dalderup
authored
Aug 15, 2019
1 parent
ac2d460
commit fd72408
Showing
7 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import { compose, mapProps } from 'recompose'; | ||
import { progressValues } from 'spunky'; | ||
import { progressValues, withProgress } from 'spunky'; | ||
import { omit } from 'lodash'; | ||
|
||
import authActions from 'auth/actions/authActions'; | ||
|
||
const { LOADED } = progressValues; | ||
|
||
export default function withAuthState() { | ||
return compose( | ||
withProgress(authActions, { propName: 'authStateLoadingProgress' }), | ||
mapProps((props) => ({ | ||
...omit(props, 'progress'), | ||
authenticated: props.progress === LOADED | ||
...omit(props, 'authStateLoadingProgress'), | ||
authenticated: props.authStateLoadingProgress === LOADED | ||
})) | ||
); | ||
} |
13 changes: 5 additions & 8 deletions
13
src/renderer/browser/components/RequestsProcessor/RequestsProcessor.js
This file contains 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
This file contains 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
This file contains 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
8 changes: 7 additions & 1 deletion
8
src/renderer/root/components/AuthenticatedLayout/Navigation/index.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
export { default } from './Navigation'; | ||
import { compose } from 'recompose'; | ||
|
||
import withAuthState from 'auth/hocs/withAuthState'; | ||
|
||
import Navigation from './Navigation'; | ||
|
||
export default compose(withAuthState())(Navigation); |
This file contains 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
This file contains 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