mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-16 05:05:07 -05:00
feat(ui): make archiving and auto-add mutually exclusive
This commit is contained in:
committed by
psychedelicious
parent
68c0aa898f
commit
071e8bcee4
@@ -2,9 +2,11 @@ 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 { boardName } = useListAllBoardsQuery({}, {
|
||||
const queryArgs = useAppSelector(selectListBoardsQueryArgs);
|
||||
const { boardName } = useListAllBoardsQuery(queryArgs, {
|
||||
selectFromResult: ({ data }) => {
|
||||
const selectedBoard = data?.find((b) => b.board_id === board_id);
|
||||
const boardName = selectedBoard?.board_name || t('boards.uncategorized');
|
||||
|
||||
Reference in New Issue
Block a user