mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
lint fix
This commit is contained in:
parent
071e8bcee4
commit
29eb3c8b62
@ -7,11 +7,11 @@ 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';
|
||||
import { useAddImagesToBoardMutation, useRemoveImagesFromBoardMutation } from 'services/api/endpoints/images';
|
||||
import { selectListBoardsQueryArgs } from '../../gallery/store/gallerySelectors';
|
||||
|
||||
const selectImagesToChange = createMemoizedSelector(
|
||||
selectChangeBoardModalSlice,
|
||||
|
@ -8,13 +8,12 @@ import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { PiArchiveBold, PiArchiveFill, PiDownloadBold, PiPlusBold } from 'react-icons/pi';
|
||||
import { useUpdateBoardMutation } from 'services/api/endpoints/boards';
|
||||
import { useBulkDownloadImagesMutation } from 'services/api/endpoints/images';
|
||||
import { useBoardName } from 'services/api/hooks/useBoardName';
|
||||
import type { BoardDTO } from 'services/api/types';
|
||||
|
||||
import GalleryBoardContextMenuItems from './GalleryBoardContextMenuItems';
|
||||
import { useUpdateBoardMutation } from '../../../../services/api/endpoints/boards';
|
||||
import { MdArchive, MdUnarchive } from 'react-icons/md';
|
||||
|
||||
type Props = {
|
||||
board?: BoardDTO;
|
||||
@ -109,6 +108,9 @@ const BoardContextMenu = ({ board, board_id, setBoardToDelete, children }: Props
|
||||
isSelectedForAutoAdd,
|
||||
setBoardToDelete,
|
||||
t,
|
||||
handleArchive,
|
||||
handleUnarchive,
|
||||
isBoardArchived,
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -2,6 +2,7 @@ import { Collapse, Flex, Grid, GridItem } from '@invoke-ai/ui-library';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants';
|
||||
import DeleteBoardModal from 'features/gallery/components/Boards/DeleteBoardModal';
|
||||
import { selectListBoardsQueryArgs } from 'features/gallery/store/gallerySelectors';
|
||||
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
|
||||
import type { CSSProperties } from 'react';
|
||||
import { memo, useState } from 'react';
|
||||
@ -12,7 +13,6 @@ import AddBoardButton from './AddBoardButton';
|
||||
import BoardsSearch from './BoardsSearch';
|
||||
import GalleryBoard from './GalleryBoard';
|
||||
import NoBoardBoard from './NoBoardBoard';
|
||||
import { selectListBoardsQueryArgs } from '../../../store/gallerySelectors';
|
||||
|
||||
const overlayScrollbarsStyles: CSSProperties = {
|
||||
height: '100%',
|
||||
@ -28,7 +28,6 @@ const BoardsList = (props: Props) => {
|
||||
const selectedBoardId = useAppSelector((s) => s.gallery.selectedBoardId);
|
||||
const boardSearchText = useAppSelector((s) => s.gallery.boardSearchText);
|
||||
const queryArgs = useAppSelector(selectListBoardsQueryArgs);
|
||||
console.log({ queryArgs });
|
||||
const { data: boards } = useListAllBoardsQuery(queryArgs);
|
||||
const filteredBoards = boardSearchText
|
||||
? boards?.filter((board) => board.board_name.toLowerCase().includes(boardSearchText.toLowerCase()))
|
||||
|
@ -27,6 +27,6 @@ export const selectListImagesQueryArgs = createMemoizedSelector(
|
||||
export const selectListBoardsQueryArgs = createMemoizedSelector(
|
||||
selectGallerySlice,
|
||||
(gallery): ListBoardsArgs => ({
|
||||
archived: gallery.shouldShowArchivedBoards ? true : undefined
|
||||
archived: gallery.shouldShowArchivedBoards ? true : undefined,
|
||||
})
|
||||
);
|
||||
|
@ -1,6 +1,7 @@
|
||||
import type { ComboboxOnChange, ComboboxOption } from '@invoke-ai/ui-library';
|
||||
import { Combobox, FormControl } from '@invoke-ai/ui-library';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { selectListBoardsQueryArgs } from 'features/gallery/store/gallerySelectors';
|
||||
import { fieldBoardValueChanged } from 'features/nodes/store/nodesSlice';
|
||||
import type { BoardFieldInputInstance, BoardFieldInputTemplate } from 'features/nodes/types/field';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
@ -8,7 +9,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useListAllBoardsQuery } from 'services/api/endpoints/boards';
|
||||
|
||||
import type { FieldComponentProps } from './types';
|
||||
import { selectListBoardsQueryArgs } from '../../../../../../../gallery/store/gallerySelectors';
|
||||
|
||||
const BoardFieldInputComponent = (props: FieldComponentProps<BoardFieldInputInstance, BoardFieldInputTemplate>) => {
|
||||
const { nodeId, field } = props;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { selectListBoardsQueryArgs } from 'features/gallery/store/gallerySelectors';
|
||||
import type { BoardId } from 'features/gallery/store/types';
|
||||
import { t } from 'i18next';
|
||||
import { useListAllBoardsQuery } from 'services/api/endpoints/boards';
|
||||
import { selectListBoardsQueryArgs } from '../../../features/gallery/store/gallerySelectors';
|
||||
import { useAppSelector } from '../../../app/store/storeHooks';
|
||||
|
||||
export const useBoardName = (board_id: BoardId) => {
|
||||
const queryArgs = useAppSelector(selectListBoardsQueryArgs);
|
||||
|
Loading…
Reference in New Issue
Block a user