Skip to content

Commit 60e8745

Browse files
fix(ui): useIsEntityTypeEnabled should use useMemo not useCallback
Typo/bug introduced in #7770
1 parent 6a822a5 commit 60e8745

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

invokeai/frontend/web/src/features/controlLayers/hooks/useIsEntityTypeEnabled.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { useAppSelector } from 'app/store/storeHooks';
22
import { selectIsCogView4, selectIsSD3 } from 'features/controlLayers/store/paramsSlice';
33
import type { CanvasEntityType } from 'features/controlLayers/store/types';
4-
import { useCallback } from 'react';
4+
import { useMemo } from 'react';
55

66
export const useIsEntityTypeEnabled = (entityType: CanvasEntityType) => {
77
const isSD3 = useAppSelector(selectIsSD3);
88
const isCogView4 = useAppSelector(selectIsCogView4);
99

10-
const isEntityTypeEnabled = useCallback(() => {
10+
const isEntityTypeEnabled = useMemo<boolean>(() => {
1111
switch (entityType) {
1212
case 'reference_image':
1313
return !isSD3 && !isCogView4;

0 commit comments

Comments
 (0)