mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): tidy up update image board modal
This commit is contained in:
parent
79f0c4d3c4
commit
3c04340f3f
@ -1,8 +1,6 @@
|
||||
import { useDisclosure } from '@chakra-ui/react';
|
||||
import { useAppDispatch } from 'app/store/storeHooks';
|
||||
import { PropsWithChildren, createContext, useCallback, useState } from 'react';
|
||||
import { ImageDTO } from 'services/api';
|
||||
import { imageAddedToBoard } from '../../services/thunks/board';
|
||||
import { useAddImageToBoardMutation } from 'services/apiSlice';
|
||||
|
||||
export type ImageUsage = {
|
||||
@ -41,7 +39,6 @@ type Props = PropsWithChildren;
|
||||
|
||||
export const AddImageToBoardContextProvider = (props: Props) => {
|
||||
const [imageToMove, setImageToMove] = useState<ImageDTO>();
|
||||
const dispatch = useAppDispatch();
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
const [addImageToBoard, result] = useAddImageToBoardMutation();
|
||||
|
@ -6,9 +6,7 @@ import {
|
||||
AlertDialogHeader,
|
||||
AlertDialogOverlay,
|
||||
Box,
|
||||
Divider,
|
||||
Flex,
|
||||
Select,
|
||||
Spinner,
|
||||
Text,
|
||||
} from '@chakra-ui/react';
|
||||
@ -16,9 +14,6 @@ import IAIButton from 'common/components/IAIButton';
|
||||
|
||||
import { memo, useContext, useRef, useState } from 'react';
|
||||
import { AddImageToBoardContext } from '../../../../app/contexts/AddImageToBoardContext';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { selectBoardsAll } from '../../store/boardSlice';
|
||||
import IAISelect from '../../../../common/components/IAISelect';
|
||||
import IAIMantineSelect from 'common/components/IAIMantineSelect';
|
||||
import { useListAllBoardsQuery } from 'services/apiSlice';
|
||||
|
||||
@ -46,7 +41,7 @@ const UpdateImageBoardModal = () => {
|
||||
<AlertDialogOverlay>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader fontSize="lg" fontWeight="bold">
|
||||
Move Image to Board
|
||||
{currentBoard ? 'Move Image to Board' : 'Add Image to Board'}
|
||||
</AlertDialogHeader>
|
||||
|
||||
<AlertDialogBody>
|
||||
@ -86,7 +81,7 @@ const UpdateImageBoardModal = () => {
|
||||
}}
|
||||
ml={3}
|
||||
>
|
||||
Add to Board
|
||||
{currentBoard ? 'Move' : 'Add'}
|
||||
</IAIButton>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
|
Loading…
Reference in New Issue
Block a user