15 lines
300 B
JavaScript
15 lines
300 B
JavaScript
|
import { SETWINDOWINNERHEIGHT } from "../actions/innerWindowHeightAction";
|
||
|
|
||
|
export default (state, action) => {
|
||
|
if (!state) {
|
||
|
state = window.innerHeight;
|
||
|
}
|
||
|
|
||
|
switch (action.type) {
|
||
|
case SETWINDOWINNERHEIGHT:
|
||
|
return action.windowInnerHeight;
|
||
|
default:
|
||
|
return state;
|
||
|
}
|
||
|
};
|