feat(ui): refactor image deletion

Add `DeleteImageContext`:
- provide a single function to delete an image
- opens the modal or immediately deletes, if confirm is off
This commit is contained in:
psychedelicious
2023-06-06 00:40:40 +10:00
parent fa338ddb6a
commit 3d249c4fa3
9 changed files with 191 additions and 216 deletions

View File

@ -14,6 +14,7 @@ import { useAppToaster } from 'app/components/Toaster';
import IAIDndImage from 'common/components/IAIDndImage';
import { ImageDTO } from 'services/api';
import { IAIImageFallback } from 'common/components/IAIImageFallback';
import { useGetIsImageInUse } from 'common/hooks/useGetIsImageInUse';
const selector = createSelector(
[generationSelector],