mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
close modal when user clicks cancel (#3656)
* close modal when user clicks cancel * close modal when delete image context cleared --------- Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
This commit is contained in:
parent
8283b80b58
commit
ea81ce9489
@ -23,6 +23,7 @@ import { stateSelector } from 'app/store/store';
|
||||
import {
|
||||
imageDeletionConfirmed,
|
||||
imageToDeleteCleared,
|
||||
isModalOpenChanged,
|
||||
selectImageUsage,
|
||||
} from '../store/imageDeletionSlice';
|
||||
|
||||
@ -63,6 +64,7 @@ const DeleteImageModal = () => {
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
dispatch(imageToDeleteCleared());
|
||||
dispatch(isModalOpenChanged(false));
|
||||
}, [dispatch]);
|
||||
|
||||
const handleDelete = useCallback(() => {
|
||||
|
@ -31,6 +31,7 @@ const imageDeletion = createSlice({
|
||||
},
|
||||
imageToDeleteCleared: (state) => {
|
||||
state.imageToDelete = null;
|
||||
state.isModalOpen = false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user