feat(ui): add comments for weird stuff

This commit is contained in:
psychedelicious 2023-05-26 16:43:25 +10:00
parent 249522b568
commit 7b0938e7e4

View File

@ -11,6 +11,8 @@ export const receivedResultImagesPage = createAppAsyncThunk(
async (_arg, { getState, rejectWithValue }) => {
const { page, pages, nextPage, upsertedImageCount } = getState().results;
// If many images have been upserted, we need to offset the page number
// TODO: add an offset param to the list images endpoint
const pageOffset = Math.floor(upsertedImageCount / IMAGES_PER_PAGE);
const response = await ImagesService.listImagesWithMetadata({
@ -31,6 +33,8 @@ export const receivedUploadImagesPage = createAppAsyncThunk(
async (_arg, { getState, rejectWithValue }) => {
const { page, pages, nextPage, upsertedImageCount } = getState().uploads;
// If many images have been upserted, we need to offset the page number
// TODO: add an offset param to the list images endpoint
const pageOffset = Math.floor(upsertedImageCount / IMAGES_PER_PAGE);
const response = await ImagesService.listImagesWithMetadata({