File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
invokeai/frontend/web/src/features
gallery/components/ImageViewer Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ import CurrentImageButtons from './CurrentImageButtons';
9
9
import { ViewerToggleMenu } from './ViewerToggleMenu' ;
10
10
11
11
export const ViewerToolbar = memo ( ( ) => {
12
- const tab = useAppSelector ( activeTabNameSelector ) ;
12
+ const showToggle = useAppSelector ( ( s ) => {
13
+ const tab = activeTabNameSelector ( s ) ;
14
+ if ( tab === 'upscaling' || tab === 'workflows' ) {
15
+ return false ;
16
+ }
17
+ return true ;
18
+ } ) ;
13
19
return (
14
20
< Flex w = "full" gap = { 2 } >
15
21
< Flex flex = { 1 } justifyContent = "center" >
@@ -23,7 +29,7 @@ export const ViewerToolbar = memo(() => {
23
29
</ Flex >
24
30
< Flex flex = { 1 } justifyContent = "center" >
25
31
< Flex gap = { 2 } marginInlineStart = "auto" >
26
- { tab !== 'workflows' && < ViewerToggleMenu /> }
32
+ { showToggle && < ViewerToggleMenu /> }
27
33
</ Flex >
28
34
</ Flex >
29
35
</ Flex >
Original file line number Diff line number Diff line change 1
1
import { Box } from '@invoke-ai/ui-library' ;
2
2
import { ImageViewer } from 'features/gallery/components/ImageViewer/ImageViewer' ;
3
- import { useImageViewer } from 'features/gallery/components/ImageViewer/useImageViewer' ;
4
3
import { memo } from 'react' ;
5
4
6
5
const UpscalingTab = ( ) => {
7
- const imageViewer = useImageViewer ( ) ;
8
6
return (
9
7
< Box layerStyle = "first" position = "relative" w = "full" h = "full" p = { 2 } borderRadius = "base" >
10
- { imageViewer . isOpen && < ImageViewer /> }
8
+ < ImageViewer />
11
9
</ Box >
12
10
) ;
13
11
} ;
You can’t perform that action at this time.
0 commit comments