This repository has been archived by the owner on Feb 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(#113): init app properly before loading additional views to preve…
…nt invalid auth session states
- Loading branch information
Andreas Gasser
committed
May 13, 2019
1 parent
1bb48db
commit 6e8528d
Showing
4 changed files
with
50 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import LoadingIndicator from '../ui/async/LoadingIndicator'; | ||
import View from '../ui/View'; | ||
|
||
import { Colors } from '../styles'; | ||
|
||
const StyledContainer = styled(View)` | ||
text-align: center; | ||
color: ${Colors.ColorsPalette.TextFaded}; | ||
`; | ||
|
||
const AppLoadingView = () => ( | ||
<View> | ||
<StyledContainer> | ||
<h3>Please stay tuned, app is loading.</h3> | ||
<LoadingIndicator size={120} /> | ||
</StyledContainer> | ||
</View> | ||
); | ||
|
||
export const __testables__ = { | ||
StyledContainer, | ||
}; | ||
|
||
export default AppLoadingView; |
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,8 +1,15 @@ | ||
import { createSelector } from 'reselect'; | ||
|
||
import { AppStatus } from './index'; | ||
|
||
export const applicationStateSelector = state => state.application || {}; | ||
|
||
export const applicationStatusSelector = createSelector( | ||
applicationStateSelector, | ||
({ status }) => status, | ||
); | ||
|
||
export const applicationDidLoadSelector = createSelector( | ||
applicationStatusSelector, | ||
status => status && status === AppStatus.APPLICATION_DID_LOAD, | ||
); |