mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-01-31 05:38:00 -05:00
fix(ui): useIsEntityTypeEnabled should use useMemo not useCallback
Typo/bug introduced in #7770
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { selectIsCogView4, selectIsSD3 } from 'features/controlLayers/store/paramsSlice';
|
||||
import type { CanvasEntityType } from 'features/controlLayers/store/types';
|
||||
import { useCallback } from 'react';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
export const useIsEntityTypeEnabled = (entityType: CanvasEntityType) => {
|
||||
const isSD3 = useAppSelector(selectIsSD3);
|
||||
const isCogView4 = useAppSelector(selectIsCogView4);
|
||||
|
||||
const isEntityTypeEnabled = useCallback(() => {
|
||||
const isEntityTypeEnabled = useMemo<boolean>(() => {
|
||||
switch (entityType) {
|
||||
case 'reference_image':
|
||||
return !isSD3 && !isCogView4;
|
||||
|
||||
Reference in New Issue
Block a user