File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
invokeai/frontend/web/src/features/controlLayers/hooks Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { useAppSelector } from 'app/store/storeHooks' ;
2
2
import { selectIsCogView4 , selectIsSD3 } from 'features/controlLayers/store/paramsSlice' ;
3
3
import type { CanvasEntityType } from 'features/controlLayers/store/types' ;
4
- import { useCallback } from 'react' ;
4
+ import { useMemo } from 'react' ;
5
5
6
6
export const useIsEntityTypeEnabled = ( entityType : CanvasEntityType ) => {
7
7
const isSD3 = useAppSelector ( selectIsSD3 ) ;
8
8
const isCogView4 = useAppSelector ( selectIsCogView4 ) ;
9
9
10
- const isEntityTypeEnabled = useCallback ( ( ) => {
10
+ const isEntityTypeEnabled = useMemo < boolean > ( ( ) => {
11
11
switch ( entityType ) {
12
12
case 'reference_image' :
13
13
return ! isSD3 && ! isCogView4 ;
You can’t perform that action at this time.
0 commit comments