Something went wrong on our end
-
Art Lowel authored8e4bec9c
host-window.reducer.ts 510 B
import { HostWindowAction, HostWindowActionTypes } from "./host-window.actions";
export interface HostWindowState {
width: number;
height: number;
}
const initialState: HostWindowState = {
width: null,
height: null
};
export const hostWindowReducer = (state = initialState, action: HostWindowAction): HostWindowState => {
switch (action.type) {
case HostWindowActionTypes.RESIZE: {
return Object.assign({}, state, action.payload);
}
default: {
return state;
}
}
};