lml-main
Version:
This is now a mono repository published into many standalone packages.
25 lines (24 loc) • 1.09 kB
TypeScript
import { AppState } from '../../common/reducers';
import { LastKeysState } from '../../jobs/reducers/pagination';
export declare const getAllLastKeys: (state: AppState) => LastKeysState[];
export declare const getPagePointer: (state: AppState) => number;
/**
* Let's say the page pointer has been updated to 1,
* we now need to get the last keys for page 0 and include
* them in the request for the jobs at page 1.
* This means the last keys for the current page always refers
* to the previous page's pagePointer
*
* @param state
*/
export declare const getLastKeysForPage: (state: AppState) => LastKeysState;
export declare const canPageBack: (state: AppState) => any;
export declare const canPageForwards: (state: AppState) => any;
/**
* This check is required because we are polling for all the frequencies
* including frequencies that aren't active - therefore we need to check
* if the pagination is actually for one of the frequencies that is currently active
*
* @param state
*/
export declare const lastKeyIsActive: (state: AppState, forNextPage?: boolean) => any;