@@ -14,14 +14,12 @@ import {
1414import { createSelector } from '@reduxjs/toolkit' ;
1515import { useAppDispatch , useAppSelector } from 'app/store/storeHooks' ;
1616import { useGallerySearchTerm } from 'features/gallery/components/ImageGrid/useGallerySearchTerm' ;
17- import CurrentImageButtons from 'features/gallery/components/ImageViewer/CurrentImageButtons' ;
18- import CurrentImagePreview from 'features/gallery/components/ImageViewer/CurrentImagePreview' ;
19- import { selectIsMiniViewerOpen , selectSelectedBoardId } from 'features/gallery/store/gallerySelectors' ;
20- import { galleryViewChanged , isMiniViewerOpenToggled , selectGallerySlice } from 'features/gallery/store/gallerySlice' ;
17+ import { selectSelectedBoardId } from 'features/gallery/store/gallerySelectors' ;
18+ import { galleryViewChanged , selectGallerySlice } from 'features/gallery/store/gallerySlice' ;
2119import type { CSSProperties } from 'react' ;
2220import { useCallback } from 'react' ;
2321import { useTranslation } from 'react-i18next' ;
24- import { PiEyeBold , PiEyeClosedBold , PiMagnifyingGlassBold } from 'react-icons/pi' ;
22+ import { PiMagnifyingGlassBold } from 'react-icons/pi' ;
2523import { useBoardName } from 'services/api/hooks/useBoardName' ;
2624
2725import GalleryImageGrid from './ImageGrid/GalleryImageGrid' ;
@@ -52,11 +50,6 @@ export const Gallery = () => {
5250 const initialSearchTerm = useAppSelector ( selectSearchTerm ) ;
5351 const searchDisclosure = useDisclosure ( { defaultIsOpen : initialSearchTerm . length > 0 } ) ;
5452 const [ searchTerm , onChangeSearchTerm , onResetSearchTerm ] = useGallerySearchTerm ( ) ;
55- const isMiniViewerOpen = useAppSelector ( selectIsMiniViewerOpen ) ;
56-
57- const toggleMiniViewer = useCallback ( ( ) => {
58- dispatch ( isMiniViewerOpenToggled ( ) ) ;
59- } , [ dispatch ] ) ;
6053 const handleClickImages = useCallback ( ( ) => {
6154 dispatch ( galleryViewChanged ( 'images' ) ) ;
6255 } , [ dispatch ] ) ;
@@ -87,27 +80,15 @@ export const Gallery = () => {
8780 < Tab sx = { BASE_STYLES } _selected = { SELECTED_STYLES } onClick = { handleClickAssets } data-testid = "assets-tab" >
8881 { t ( 'gallery.assets' ) }
8982 </ Tab >
90- < Flex h = "full" >
91- < IconButton
92- size = "sm"
93- variant = "link"
94- alignSelf = "stretch"
95- onClick = { toggleMiniViewer }
96- tooltip = { t ( 'gallery.toggleMiniViewer' ) }
97- aria-label = { t ( 'gallery.toggleMiniViewer' ) }
98- icon = { isMiniViewerOpen ? < PiEyeBold /> : < PiEyeClosedBold /> }
99- colorScheme = { isMiniViewerOpen ? 'invokeBlue' : 'base' }
100- />
101- < IconButton
102- size = "sm"
103- variant = "link"
104- alignSelf = "stretch"
105- onClick = { handleClickSearch }
106- tooltip = { searchDisclosure . isOpen ? `${ t ( 'gallery.exitSearch' ) } ` : `${ t ( 'gallery.displaySearch' ) } ` }
107- aria-label = { t ( 'gallery.displaySearch' ) }
108- icon = { < PiMagnifyingGlassBold /> }
109- />
110- </ Flex >
83+ < IconButton
84+ size = "sm"
85+ variant = "link"
86+ alignSelf = "stretch"
87+ onClick = { handleClickSearch }
88+ tooltip = { searchDisclosure . isOpen ? `${ t ( 'gallery.exitSearch' ) } ` : `${ t ( 'gallery.displaySearch' ) } ` }
89+ aria-label = { t ( 'gallery.displaySearch' ) }
90+ icon = { < PiMagnifyingGlassBold /> }
91+ />
11192 </ TabList >
11293 </ Tabs >
11394
@@ -120,21 +101,6 @@ export const Gallery = () => {
120101 />
121102 </ Box >
122103 </ Collapse >
123- < Collapse in = { isMiniViewerOpen } style = { COLLAPSE_STYLES } >
124- < Box position = "relative" w = "full" mt = { 2 } aspectRatio = "1/1" >
125- < CurrentImagePreview />
126- < Flex
127- position = "absolute"
128- top = { 2 }
129- gap = { 2 }
130- justifyContent = "space-between"
131- left = "50%"
132- transform = "translateX(-50%)"
133- >
134- < CurrentImageButtons />
135- </ Flex >
136- </ Box >
137- </ Collapse >
138104 < GalleryImageGrid />
139105 < GalleryPagination />
140106 </ Flex >
0 commit comments