diff --git a/invokeai/frontend/web/src/app/store/createMemoizedSelector.ts b/invokeai/frontend/web/src/app/store/createMemoizedSelector.ts index fb49d796e1..bd6428db51 100644 --- a/invokeai/frontend/web/src/app/store/createMemoizedSelector.ts +++ b/invokeai/frontend/web/src/app/store/createMemoizedSelector.ts @@ -1,4 +1,4 @@ -import { createDraftSafeSelectorCreator, createSelector, createSelectorCreator, lruMemoize } from '@reduxjs/toolkit'; +import { createDraftSafeSelectorCreator, createSelectorCreator, lruMemoize } from '@reduxjs/toolkit'; import type { GetSelectorsOptions } from '@reduxjs/toolkit/dist/entities/state_selectors'; import type { RootState } from 'app/store/store'; import { isEqual } from 'lodash-es'; @@ -21,5 +21,4 @@ export const getSelectorsOptions: GetSelectorsOptions = { }), }; -export const createAppSelector = createSelector.withTypes(); export const createMemoizedAppSelector = createMemoizedSelector.withTypes(); diff --git a/invokeai/frontend/web/src/common/hooks/interactionScopes.ts b/invokeai/frontend/web/src/common/hooks/interactionScopes.ts index 9140b616c4..3f98b8d561 100644 --- a/invokeai/frontend/web/src/common/hooks/interactionScopes.ts +++ b/invokeai/frontend/web/src/common/hooks/interactionScopes.ts @@ -66,11 +66,6 @@ export const setScopes = (scopes: InteractionScope[]) => { log.trace(`Set scopes: ${formatScopes($activeScopes.get())}`); }; -export const clearScopes = () => { - $activeScopes.set(new Set()); - log.trace(`Cleared scopes`); -}; - export const useScopeOnFocus = (scope: InteractionScope, ref: RefObject) => { useEffect(() => { const element = ref.current; diff --git a/invokeai/frontend/web/src/features/controlLayers/contexts/EntityAdapterContext.tsx b/invokeai/frontend/web/src/features/controlLayers/contexts/EntityAdapterContext.tsx index a185d6fb69..cd0c455b55 100644 --- a/invokeai/frontend/web/src/features/controlLayers/contexts/EntityAdapterContext.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/contexts/EntityAdapterContext.tsx @@ -35,13 +35,12 @@ export const EntityLayerAdapterGate = memo(({ children }: PropsWithChildren) => EntityLayerAdapterGate.displayName = 'EntityLayerAdapterGate'; -/** @knipignore */ -export const useEntityLayerAdapter = (): CanvasLayerAdapter => { - const adapter = useContext(EntityAdapterContext); - assert(adapter, 'useEntityLayerAdapter must be used within a EntityLayerAdapterGate'); - assert(adapter.type === 'layer_adapter', 'useEntityLayerAdapter must be used with a layer adapter'); - return adapter; -}; +// export const useEntityLayerAdapter = (): CanvasLayerAdapter => { +// const adapter = useContext(EntityAdapterContext); +// assert(adapter, 'useEntityLayerAdapter must be used within a EntityLayerAdapterGate'); +// assert(adapter.type === 'layer_adapter', 'useEntityLayerAdapter must be used with a layer adapter'); +// return adapter; +// }; export const EntityMaskAdapterGate = memo(({ children }: PropsWithChildren) => { const canvasManager = useCanvasManager(); @@ -69,13 +68,12 @@ export const EntityMaskAdapterGate = memo(({ children }: PropsWithChildren) => { EntityMaskAdapterGate.displayName = 'EntityMaskAdapterGate'; -/** @knipignore */ -export const useEntityMaskAdapter = (): CanvasMaskAdapter => { - const adapter = useContext(EntityAdapterContext); - assert(adapter, 'useEntityMaskAdapter must be used within a CanvasMaskAdapterGate'); - assert(adapter.type === 'mask_adapter', 'useEntityMaskAdapter must be used with a mask adapter'); - return adapter; -}; +// export const useEntityMaskAdapter = (): CanvasMaskAdapter => { +// const adapter = useContext(EntityAdapterContext); +// assert(adapter, 'useEntityMaskAdapter must be used within a CanvasMaskAdapterGate'); +// assert(adapter.type === 'mask_adapter', 'useEntityMaskAdapter must be used with a mask adapter'); +// return adapter; +// }; export const useEntityAdapter = (): CanvasLayerAdapter | CanvasMaskAdapter => { const adapter = useContext(EntityAdapterContext); diff --git a/invokeai/frontend/web/src/features/metadata/components/MetadataControlNets.tsx b/invokeai/frontend/web/src/features/metadata/components/MetadataControlNets.tsx index ee9618ff74..4933fa7b53 100644 --- a/invokeai/frontend/web/src/features/metadata/components/MetadataControlNets.tsx +++ b/invokeai/frontend/web/src/features/metadata/components/MetadataControlNets.tsx @@ -26,9 +26,9 @@ export const MetadataControlNets = ({ metadata }: Props) => { return ( <> - {controlNets.map((controlNet) => ( + {controlNets.map((controlNet, i) => ( { return ( <> - {ipAdapters.map((ipAdapter) => ( - + {ipAdapters.map((ipAdapter, i) => ( + ))} ); diff --git a/invokeai/frontend/web/src/features/metadata/components/MetadataT2IAdapters.tsx b/invokeai/frontend/web/src/features/metadata/components/MetadataT2IAdapters.tsx index 82575783e9..52dbc4a278 100644 --- a/invokeai/frontend/web/src/features/metadata/components/MetadataT2IAdapters.tsx +++ b/invokeai/frontend/web/src/features/metadata/components/MetadataT2IAdapters.tsx @@ -26,9 +26,9 @@ export const MetadataT2IAdapters = ({ metadata }: Props) => { return ( <> - {t2iAdapters.map((t2iAdapter) => ( + {t2iAdapters.map((t2iAdapter, i) => (