EntityStore: proper pagination support

This commit is contained in:
Alex Gleason
2022-12-04 17:53:56 -06:00
parent 52059f6f37
commit f7bfc40b70
4 changed files with 48 additions and 23 deletions

View File

@ -29,6 +29,10 @@ export const getNextLink = (response: AxiosResponse): string | undefined => {
return getLinks(response).refs.find(link => link.rel === 'next')?.uri;
};
export const getPrevLink = (response: AxiosResponse): string | undefined => {
return getLinks(response).refs.find(link => link.rel === 'prev')?.uri;
};
const getToken = (state: RootState, authType: string) => {
return authType === 'app' ? getAppToken(state) : getAccessToken(state);
};