diff --git a/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityContainer.tsx b/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityContainer.tsx index 550ba0d020..5cc84f8a32 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityContainer.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityContainer.tsx @@ -2,7 +2,7 @@ import { Flex } from '@invoke-ai/ui-library'; import { useAppDispatch } from 'app/store/storeHooks'; import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext'; import { useEntitySelectionColor } from 'features/controlLayers/hooks/useEntitySelectionColor'; -import { useIsEntitySelected } from 'features/controlLayers/hooks/useIsEntitySelected'; +import { useEntityIsSelected } from 'features/controlLayers/hooks/useEntityIsSelected'; import { entitySelected } from 'features/controlLayers/store/canvasV2Slice'; import type { PropsWithChildren } from 'react'; import { memo, useCallback } from 'react'; @@ -10,7 +10,7 @@ import { memo, useCallback } from 'react'; export const CanvasEntityContainer = memo((props: PropsWithChildren) => { const dispatch = useAppDispatch(); const entityIdentifier = useEntityIdentifierContext(); - const isSelected = useIsEntitySelected(entityIdentifier); + const isSelected = useEntityIsSelected(entityIdentifier); const selectionColor = useEntitySelectionColor(entityIdentifier); const onClick = useCallback(() => { if (isSelected) { diff --git a/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityTitle.tsx b/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityTitle.tsx index cbb48fa246..3853f7249c 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityTitle.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityTitle.tsx @@ -1,6 +1,6 @@ import { Text } from '@invoke-ai/ui-library'; import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext'; -import { useIsEntitySelected } from 'features/controlLayers/hooks/useIsEntitySelected'; +import { useEntityIsSelected } from 'features/controlLayers/hooks/useEntityIsSelected'; import { memo, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { assert } from 'tsafe'; @@ -8,7 +8,7 @@ import { assert } from 'tsafe'; export const CanvasEntityTitle = memo(() => { const { t } = useTranslation(); const entityIdentifier = useEntityIdentifierContext(); - const isSelected = useIsEntitySelected(entityIdentifier); + const isSelected = useEntityIsSelected(entityIdentifier); const title = useMemo(() => { if (entityIdentifier.type === 'inpaint_mask') { return t('controlLayers.inpaintMask'); diff --git a/invokeai/frontend/web/src/features/controlLayers/hooks/useIsEntitySelected.ts b/invokeai/frontend/web/src/features/controlLayers/hooks/useEntityIsSelected.ts similarity index 87% rename from invokeai/frontend/web/src/features/controlLayers/hooks/useIsEntitySelected.ts rename to invokeai/frontend/web/src/features/controlLayers/hooks/useEntityIsSelected.ts index 8d5c3ca86f..80fe4a61b4 100644 --- a/invokeai/frontend/web/src/features/controlLayers/hooks/useIsEntitySelected.ts +++ b/invokeai/frontend/web/src/features/controlLayers/hooks/useEntityIsSelected.ts @@ -2,7 +2,7 @@ import { useAppSelector } from 'app/store/storeHooks'; import type { CanvasEntityIdentifier } from 'features/controlLayers/store/types'; import { useMemo } from 'react'; -export const useIsEntitySelected = (entityIdentifier: CanvasEntityIdentifier) => { +export const useEntityIsSelected = (entityIdentifier: CanvasEntityIdentifier) => { const selectedEntityIdentifier = useAppSelector((s) => s.canvasV2.selectedEntityIdentifier); const isSelected = useMemo(() => { return selectedEntityIdentifier?.id === entityIdentifier.id;