mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-06 08:13:46 +00:00
18 lines
522 B
TypeScript
18 lines
522 B
TypeScript
import { AppState } from 'reducers';
|
|
import { getWindowSize } from './fields';
|
|
|
|
interface ICurrentWindowSize {
|
|
raw: string;
|
|
value: number | null;
|
|
}
|
|
|
|
const isValidCurrentWindowSize = (state: AppState) => {
|
|
const currentWindowSize = getWindowSize(state);
|
|
|
|
return currentWindowSize && currentWindowSize.value && currentWindowSize.value > 0;
|
|
};
|
|
|
|
const getCurrentWindowSize = (state: AppState): ICurrentWindowSize => getWindowSize(state);
|
|
|
|
export { getCurrentWindowSize, ICurrentWindowSize, isValidCurrentWindowSize };
|