(ui): update boards list queries to only use sort params for list, and make sure archived boards are included in most places we are searching

This commit is contained in:
Mary Hipp
2024-10-11 13:52:52 -04:00
committed by Mary Hipp Rogers
parent 9933cdb6b7
commit 8d44363d49
9 changed files with 38 additions and 16 deletions

View File

@@ -9,7 +9,6 @@ import {
isModalOpenChanged,
selectChangeBoardModalSlice,
} from 'features/changeBoardModal/store/slice';
import { selectListBoardsQueryArgs } from 'features/gallery/store/gallerySelectors';
import { memo, useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useListAllBoardsQuery } from 'services/api/endpoints/boards';
@@ -29,8 +28,7 @@ const ChangeBoardModal = () => {
useAssertSingleton('ChangeBoardModal');
const dispatch = useAppDispatch();
const [selectedBoard, setSelectedBoard] = useState<string | null>();
const queryArgs = useAppSelector(selectListBoardsQueryArgs);
const { data: boards, isFetching } = useListAllBoardsQuery(queryArgs);
const { data: boards, isFetching } = useListAllBoardsQuery({include_archived: true});
const isModalOpen = useAppSelector(selectIsModalOpen);
const imagesToChange = useAppSelector(selectImagesToChange);
const [addImagesToBoard] = useAddImagesToBoardMutation();