Skip to content

Commit ffec8b1

Browse files
authored
Merge pull request #12 from scalefocus/fix/137_page_not_dynamic_after_selection
Page is not dynamic after image selection. #137
2 parents 5fa0e85 + f722eb2 commit ffec8b1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/components/ImageGallery.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ export const ImageGallery: React.FC = () => {
248248
</AppBar>
249249
</Slide>
250250

251-
{selectedImages.length > 0 && <Toolbar />}
252-
253251
<Divider sx={{ mb: 2 }} />
254252
<Typography
255253
color="text.primary"
@@ -261,6 +259,7 @@ export const ImageGallery: React.FC = () => {
261259
</Typography>
262260
<Grid container spacing={1} columns={{ xs: 3, sm: 4, lg: 6, xl: 8 }}>
263261
{hasImages &&
262+
!trashObjectMutation.isPending &&
264263
data.pages
265264
.map((page) => page.properties)
266265
.flat()
@@ -304,7 +303,7 @@ export const ImageGallery: React.FC = () => {
304303
The gallery has no images. Please upload images.{' '}
305304
</Typography>
306305
)}
307-
{isLoading && <Loading />}
306+
{(isLoading || trashObjectMutation.isPending) && <Loading />}
308307
{currentImage !== null && imageIds && (
309308
<Preview
310309
isOpen={previewOpen}

src/components/TrashGallery.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,6 @@ export const TrashGallery: React.FC = () => {
310310
</AppBar>
311311
</Slide>
312312

313-
{selectedImages.length > 0 && <Toolbar />}
314-
315313
<Divider sx={{ mb: 2 }} />
316314
{!isLoading && hasImages && (
317315
<Box

0 commit comments

Comments
 (0)