-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated selectors to default to initial state.
Updated window effects.
- Loading branch information
Showing
11 changed files
with
40 additions
and
15 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
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,6 +1,7 @@ | ||
import { createSelector, Store } from '@ngrx/store'; | ||
import { PerWindowState } from '..'; | ||
import { initialState } from './docs'; | ||
|
||
export const getDocsState = (state: PerWindowState) => state.docs; | ||
export const getDocsState = (state: PerWindowState) => state ? state.docs : { ...initialState }; | ||
export const getShowDocs = createSelector(getDocsState, state => state.showDocs); | ||
export const getDocsLoading = createSelector(getDocsState, state => state.isLoading); |
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,7 +1,8 @@ | ||
import { createSelector, Store } from '@ngrx/store'; | ||
import { PerWindowState } from '..'; | ||
import { initialState } from './gql-schema'; | ||
|
||
export const getSchemaState = (state: PerWindowState) => state.schema; | ||
export const getSchemaState = (state: PerWindowState) => state ? state.schema : { ...initialState }; | ||
export const getSchema = createSelector(getSchemaState, state => state.schema); | ||
export const getIntrospection = createSelector(getSchemaState, state => state.introspection); | ||
export const allowIntrospection = createSelector(getSchemaState, state => state.allowIntrospection); |
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,4 +1,5 @@ | ||
import { createSelector, Store } from '@ngrx/store'; | ||
import { PerWindowState } from '..'; | ||
import { initialState } from './headers'; | ||
|
||
export const getHeaders = (state: PerWindowState) => state.headers; | ||
export const getHeaders = (state: PerWindowState) => state ? state.headers : { ...initialState }; |
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,6 +1,7 @@ | ||
import { createSelector, Store } from '@ngrx/store'; | ||
import { PerWindowState } from '..'; | ||
import { initialState } from './layout'; | ||
|
||
export const getLayout = (state: PerWindowState) => state.layout; | ||
export const getLayout = (state: PerWindowState) => state ? state.layout : { ...initialState }; | ||
export const getIsLoading = createSelector(getLayout, layout => layout.isLoading); | ||
export const getTitle = createSelector(getLayout, layout => layout.title); |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { createSelector, Store } from '@ngrx/store'; | ||
import { PerWindowState } from '..'; | ||
import { initialState } from './variables'; | ||
|
||
export const getVariables = (state: PerWindowState) => state.variables.variables; | ||
export const getVariables = (state: PerWindowState) => state ? state.variables.variables : initialState.variables; |
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