parent
ec98cdd310
commit
4443f965d7
@ -0,0 +1,17 @@ |
||||
|
||||
export type actionType = { |
||||
type: 'resize' | 'other' |
||||
payload: any |
||||
} |
||||
|
||||
export function verticalScrollReducer(prevState: any, actionPayload: actionType) { |
||||
if (actionPayload.type === 'resize') { |
||||
actionPayload.payload.scrollHeight > actionPayload.payload.clientHeight |
||||
console.log(`values being checked are ${actionPayload.payload.scrollHeight} > ${actionPayload.payload.clientHeight}`) |
||||
const newvals = actionPayload.payload |
||||
return { ...newvals } |
||||
} else if (actionPayload.type === 'other') { |
||||
actionPayload.payload.scrollHeight > actionPayload.payload.clientHeight |
||||
} |
||||
return prevState |
||||
} |
Loading…
Reference in new issue