Guest User

Untitled

a guest
Jan 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import * as mobileActions from '../actions/screen.actions';
  2. import { ScreenState } from '../state/screen.state';
  3.  
  4. const initialState: ScreenState = {
  5. mobile: false,
  6. tablet: false,
  7. desktop: false,
  8. };
  9.  
  10. export function screenReducer(state: ScreenState = initialState,
  11. action: mobileActions.Actions): ScreenState {
  12. switch (action.type) {
  13. case mobileActions.ActionTypes.SET_SCREEN:
  14. return {
  15. ...action.payload
  16. };
  17. default:
  18. return state;
  19. }
  20. }
Add Comment
Please, Sign In to add comment