diff --git a/invokeai/frontend/web/src/app/logging/useLogger.ts b/invokeai/frontend/web/src/app/logging/useLogger.ts index 653822987a..a165319817 100644 --- a/invokeai/frontend/web/src/app/logging/useLogger.ts +++ b/invokeai/frontend/web/src/app/logging/useLogger.ts @@ -1,24 +1,20 @@ import { createLogWriter } from '@roarr/browser-log-writer'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; -import type { RootState} from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; +import { selectSystemSlice } from 'features/system/store/systemSlice'; import { useEffect, useMemo } from 'react'; import { ROARR, Roarr } from 'roarr'; import type { LoggerNamespace } from './logger'; import { $logger, BASE_CONTEXT, LOG_LEVEL_MAP, logger } from './logger'; +const selector = createMemoizedSelector(selectSystemSlice, (system) => { + const { consoleLogLevel, shouldLogToConsole } = system; -const selector = createMemoizedSelector( - (state: RootState) => state.system, - (system) => { - const { consoleLogLevel, shouldLogToConsole } = system; - - return { - consoleLogLevel, - shouldLogToConsole, - }; - } -); + return { + consoleLogLevel, + shouldLogToConsole, + }; +}); export const useLogger = (namespace: LoggerNamespace) => { const { consoleLogLevel, shouldLogToConsole } = useAppSelector(selector); diff --git a/invokeai/frontend/web/src/common/hooks/useFullscreenDropzone.ts b/invokeai/frontend/web/src/common/hooks/useFullscreenDropzone.ts index cac7967279..8c4b312eec 100644 --- a/invokeai/frontend/web/src/common/hooks/useFullscreenDropzone.ts +++ b/invokeai/frontend/web/src/common/hooks/useFullscreenDropzone.ts @@ -1,7 +1,7 @@ import { useAppToaster } from 'app/components/Toaster'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; -import type { RootState } from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; +import { selectGallerySlice } from 'features/gallery/store/gallerySlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { useCallback, useEffect, useState } from 'react'; import type { Accept, FileRejection } from 'react-dropzone'; @@ -16,7 +16,7 @@ const accept: Accept = { }; const selector = createMemoizedSelector( - [(state: RootState) => state.gallery, activeTabNameSelector], + [selectGallerySlice, activeTabNameSelector], (gallery, activeTabName) => { let postUploadAction: PostUploadAction = { type: 'TOAST' }; diff --git a/invokeai/frontend/web/src/common/hooks/useImageUploadButton.tsx b/invokeai/frontend/web/src/common/hooks/useImageUploadButton.tsx index 45c8ab7dbe..085c98cb38 100644 --- a/invokeai/frontend/web/src/common/hooks/useImageUploadButton.tsx +++ b/invokeai/frontend/web/src/common/hooks/useImageUploadButton.tsx @@ -32,9 +32,7 @@ export const useImageUploadButton = ({ postUploadAction, isDisabled, }: UseImageUploadButtonArgs) => { - const autoAddBoardId = useAppSelector( - (s) => s.gallery.autoAddBoardId - ); + const autoAddBoardId = useAppSelector((s) => s.gallery.autoAddBoardId); const [uploadImage] = useUploadImageMutation(); const onDropAccepted = useCallback( (files: File[]) => { diff --git a/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts b/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts index 27eceab1a9..06a4bdec99 100644 --- a/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts +++ b/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts @@ -1,10 +1,17 @@ import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; -import type { RootState } from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; -import { selectControlAdapterAll } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { + selectControlAdapterAll, + selectControlAdaptersSlice, +} from 'features/controlAdapters/store/controlAdaptersSlice'; import { isControlNetOrT2IAdapter } from 'features/controlAdapters/store/types'; +import { selectDynamicPromptsSlice } from 'features/dynamicPrompts/store/dynamicPromptsSlice'; import { getShouldProcessPrompt } from 'features/dynamicPrompts/util/getShouldProcessPrompt'; +import { selectNodesSlice } from 'features/nodes/store/nodesSlice'; +import { selectNodeTemplatesSlice } from 'features/nodes/store/nodeTemplatesSlice'; import { isInvocationNode } from 'features/nodes/types/invocation'; +import { selectGenerationSlice } from 'features/parameters/store/generationSlice'; +import { selectSystemSlice } from 'features/system/store/systemSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import i18n from 'i18next'; import { forEach } from 'lodash-es'; @@ -12,12 +19,12 @@ import { getConnectedEdges } from 'reactflow'; const selector = createMemoizedSelector( [ - (state: RootState) => state.controlAdapters, - (state: RootState) => state.generation, - (state: RootState) => state.system, - (state: RootState) => state.nodes, - (state: RootState) => state.nodeTemplates, - (state: RootState) => state.dynamicPrompts, + selectControlAdaptersSlice, + selectGenerationSlice, + selectSystemSlice, + selectNodesSlice, + selectNodeTemplatesSlice, + selectDynamicPromptsSlice, activeTabNameSelector, ], ( diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx index 597b1f2b2d..2b1fda996d 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasToolbar/IAICanvasUndoButton.tsx @@ -1,7 +1,7 @@ import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvIconButton } from 'common/components/InvIconButton/InvIconButton'; -import { selectCanvasSlice,undo } from 'features/canvas/store/canvasSlice'; +import { selectCanvasSlice, undo } from 'features/canvas/store/canvasSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { memo, useCallback } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; diff --git a/invokeai/frontend/web/src/features/controlAdapters/hooks/useAddControlAdapter.ts b/invokeai/frontend/web/src/features/controlAdapters/hooks/useAddControlAdapter.ts index 023b38d5a7..c08adc7f6f 100644 --- a/invokeai/frontend/web/src/features/controlAdapters/hooks/useAddControlAdapter.ts +++ b/invokeai/frontend/web/src/features/controlAdapters/hooks/useAddControlAdapter.ts @@ -6,9 +6,7 @@ import { useCallback, useMemo } from 'react'; import { useControlAdapterModels } from './useControlAdapterModels'; export const useAddControlAdapter = (type: ControlAdapterType) => { - const baseModel = useAppSelector( - (s) => s.generation.model?.base_model - ); + const baseModel = useAppSelector((s) => s.generation.model?.base_model); const dispatch = useAppDispatch(); const models = useControlAdapterModels(type); diff --git a/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsSeedBehaviour.tsx b/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsSeedBehaviour.tsx index 08194db0b8..85ef020dfa 100644 --- a/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsSeedBehaviour.tsx +++ b/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsSeedBehaviour.tsx @@ -15,9 +15,7 @@ import { useTranslation } from 'react-i18next'; const ParamDynamicPromptsSeedBehaviour = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); - const seedBehaviour = useAppSelector( - (s) => s.dynamicPrompts.seedBehaviour - ); + const seedBehaviour = useAppSelector((s) => s.dynamicPrompts.seedBehaviour); const options = useMemo(() => { return [ diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardAutoAddSelect.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardAutoAddSelect.tsx index d13dac4e93..1c675aa412 100644 --- a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardAutoAddSelect.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardAutoAddSelect.tsx @@ -5,9 +5,7 @@ import type { InvSelectOnChange, InvSelectOption, } from 'common/components/InvSelect/types'; -import { - autoAddBoardIdChanged, -} from 'features/gallery/store/gallerySlice'; +import { autoAddBoardIdChanged } from 'features/gallery/store/gallerySlice'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { useListAllBoardsQuery } from 'services/api/endpoints/boards'; @@ -15,9 +13,7 @@ import { useListAllBoardsQuery } from 'services/api/endpoints/boards'; const BoardAutoAddSelect = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); - const autoAddBoardId = useAppSelector( - (s) => s.gallery.autoAddBoardId - ); + const autoAddBoardId = useAppSelector((s) => s.gallery.autoAddBoardId); const autoAssignBoardOnClick = useAppSelector( (s) => s.gallery.autoAssignBoardOnClick ); diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx index 77e34af5ab..69941ecd0c 100644 --- a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx @@ -24,12 +24,8 @@ type Props = { const BoardsList = (props: Props) => { const { isOpen } = props; - const selectedBoardId = useAppSelector( - (s) => s.gallery.selectedBoardId - ); - const boardSearchText = useAppSelector( - (s) => s.gallery.boardSearchText - ); + const selectedBoardId = useAppSelector((s) => s.gallery.selectedBoardId); + const boardSearchText = useAppSelector((s) => s.gallery.boardSearchText); const { data: boards } = useListAllBoardsQuery(); const filteredBoards = boardSearchText ? boards?.filter((board) => diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageDisplay.tsx b/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageDisplay.tsx index 7798f66a9d..3341131a07 100644 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageDisplay.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageDisplay.tsx @@ -2,6 +2,7 @@ import { Flex } from '@chakra-ui/react'; import { memo } from 'react'; import CurrentImageButtons from './CurrentImageButtons'; +import CurrentImagePreview from './CurrentImagePreview'; const CurrentImageDisplay = () => { return ( @@ -15,7 +16,7 @@ const CurrentImageDisplay = () => { justifyContent="center" > - {/* */} + ); }; diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImageGrid.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImageGrid.tsx index a2719ad46a..a15fd3bd93 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImageGrid.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImageGrid.tsx @@ -44,9 +44,7 @@ const GalleryImageGrid = () => { const [initialize, osInstance] = useOverlayScrollbars( overlayScrollbarsParams ); - const selectedBoardId = useAppSelector( - (s) => s.gallery.selectedBoardId - ); + const selectedBoardId = useAppSelector((s) => s.gallery.selectedBoardId); const { currentViewTotal } = useBoardTotal(selectedBoardId); const queryArgs = useAppSelector(selectListImagesBaseQueryArgs); diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGrid/ImageGridListContainer.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageGrid/ImageGridListContainer.tsx index 5c008fda21..e28dcdd348 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageGrid/ImageGridListContainer.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageGrid/ImageGridListContainer.tsx @@ -1,6 +1,5 @@ import type { FlexProps } from '@chakra-ui/react'; import { forwardRef, Grid } from '@chakra-ui/react'; -import type { RootState } from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; import type { PropsWithChildren } from 'react'; import { memo } from 'react'; @@ -8,7 +7,7 @@ import { memo } from 'react'; type ListContainerProps = PropsWithChildren & FlexProps; const ListContainer = forwardRef((props: ListContainerProps, ref) => { const galleryImageMinimumWidth = useAppSelector( - (state: RootState) => state.gallery.galleryImageMinimumWidth + (s) => s.gallery.galleryImageMinimumWidth ); return ( diff --git a/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts b/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts index 960937201e..3112ac3351 100644 --- a/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts +++ b/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts @@ -1,7 +1,10 @@ import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { selectListImagesBaseQueryArgs } from 'features/gallery/store/gallerySelectors'; -import { selectGallerySlice, selectionChanged } from 'features/gallery/store/gallerySlice'; +import { + selectGallerySlice, + selectionChanged, +} from 'features/gallery/store/gallerySlice'; import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus'; import type { MouseEvent } from 'react'; import { useCallback, useMemo } from 'react'; diff --git a/invokeai/frontend/web/src/features/hrf/components/ParamHrfToggle.tsx b/invokeai/frontend/web/src/features/hrf/components/ParamHrfToggle.tsx index 82a67b49bb..3099fb8027 100644 --- a/invokeai/frontend/web/src/features/hrf/components/ParamHrfToggle.tsx +++ b/invokeai/frontend/web/src/features/hrf/components/ParamHrfToggle.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import type { InvLabelProps } from 'common/components/InvControl/types'; @@ -12,7 +11,7 @@ const ParamHrfToggle = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); - const hrfEnabled = useAppSelector((state: RootState) => state.hrf.hrfEnabled); + const hrfEnabled = useAppSelector((s) => s.hrf.hrfEnabled); const handleHrfEnabled = useCallback( (e: ChangeEvent) => diff --git a/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/FoundModelsList.tsx b/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/FoundModelsList.tsx index 3b326724c6..0a1acea8b8 100644 --- a/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/FoundModelsList.tsx +++ b/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/FoundModelsList.tsx @@ -1,5 +1,4 @@ import { Flex } from '@chakra-ui/react'; -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvButton } from 'common/components/InvButton/InvButton'; import { InvControl } from 'common/components/InvControl/InvControl'; @@ -22,9 +21,7 @@ import { } from 'services/api/endpoints/models'; const FoundModelsList = () => { - const searchFolder = useAppSelector( - (state: RootState) => state.modelmanager.searchFolder - ); + const searchFolder = useAppSelector((s) => s.modelmanager.searchFolder); const [nameFilter, setNameFilter] = useState(''); // Get paths of models that are already installed diff --git a/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/ScanAdvancedAddModels.tsx b/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/ScanAdvancedAddModels.tsx index 3b9bc2c985..1d4c7ae9da 100644 --- a/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/ScanAdvancedAddModels.tsx +++ b/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/ScanAdvancedAddModels.tsx @@ -1,5 +1,4 @@ import { Box, Flex } from '@chakra-ui/react'; -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvIconButton } from 'common/components/InvIconButton/InvIconButton'; @@ -21,7 +20,7 @@ import { isManualAddMode } from './AdvancedAddModels'; const ScanAdvancedAddModels = () => { const advancedAddScanModel = useAppSelector( - (state: RootState) => state.modelmanager.advancedAddScanModel + (s) => s.modelmanager.advancedAddScanModel ); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/SearchFolderForm.tsx b/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/SearchFolderForm.tsx index 2929f907a4..8cdcee5a48 100644 --- a/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/SearchFolderForm.tsx +++ b/invokeai/frontend/web/src/features/modelManager/subpanels/AddModelsPanel/SearchFolderForm.tsx @@ -1,6 +1,5 @@ import { Flex } from '@chakra-ui/react'; import { useForm } from '@mantine/form'; -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvIconButton } from 'common/components/InvIconButton/InvIconButton'; import { InvInput } from 'common/components/InvInput/InvInput'; @@ -23,9 +22,7 @@ function SearchFolderForm() { const dispatch = useAppDispatch(); const { t } = useTranslation(); - const searchFolder = useAppSelector( - (state: RootState) => state.modelmanager.searchFolder - ); + const searchFolder = useAppSelector((s) => s.modelmanager.searchFolder); const { refetch: refetchFoundModels } = useGetModelsInFolderQuery({ search_path: searchFolder ? searchFolder : '', diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/AddNodePopover/AddNodePopover.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/AddNodePopover/AddNodePopover.tsx index bc36c9015d..fe6a2ed709 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/AddNodePopover/AddNodePopover.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/AddNodePopover/AddNodePopover.tsx @@ -20,7 +20,8 @@ import { useBuildNode } from 'features/nodes/hooks/useBuildNode'; import { addNodePopoverClosed, addNodePopoverOpened, - nodeAdded } from 'features/nodes/store/nodesSlice'; + nodeAdded, +} from 'features/nodes/store/nodesSlice'; import { selectNodeTemplatesSlice } from 'features/nodes/store/nodeTemplatesSlice'; import { validateSourceAndTargetTypes } from 'features/nodes/store/util/validateSourceAndTargetTypes'; import { filter, map, memoize, some } from 'lodash-es'; @@ -66,9 +67,7 @@ const AddNodePopover = () => { const selectRef = useRef | null>(null); const inputRef = useRef(null); - const fieldFilter = useAppSelector( - (s) => s.nodes.connectionStartFieldType - ); + const fieldFilter = useAppSelector((s) => s.nodes.connectionStartFieldType); const handleFilter = useAppSelector( (s) => s.nodes.connectionStartParams?.handleType ); diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx index 26cd524d24..75dedcac80 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx @@ -74,9 +74,7 @@ export const Flow = memo(() => { const nodes = useAppSelector((s) => s.nodes.nodes); const edges = useAppSelector((s) => s.nodes.edges); const viewport = useAppSelector((s) => s.nodes.viewport); - const shouldSnapToGrid = useAppSelector( - (s) => s.nodes.shouldSnapToGrid - ); + const shouldSnapToGrid = useAppSelector((s) => s.nodes.shouldSnapToGrid); const selectionMode = useAppSelector((s) => s.nodes.selectionMode); const flowWrapper = useRef(null); const cursorPosition = useRef(null); diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/common/NodeWrapper.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/common/NodeWrapper.tsx index b4a1d52ca1..53b7fffc8b 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/common/NodeWrapper.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/common/NodeWrapper.tsx @@ -5,7 +5,10 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import NodeSelectionOverlay from 'common/components/NodeSelectionOverlay'; import { useGlobalMenuCloseTrigger } from 'common/hooks/useGlobalMenuCloseTrigger'; import { useMouseOverNode } from 'features/nodes/hooks/useMouseOverNode'; -import { nodeExclusivelySelected , selectNodesSlice } from 'features/nodes/store/nodesSlice'; +import { + nodeExclusivelySelected, + selectNodesSlice, +} from 'features/nodes/store/nodesSlice'; import { DRAG_HANDLE_CLASSNAME, NODE_WIDTH, diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/panels/MinimapPanel/MinimapPanel.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/panels/MinimapPanel/MinimapPanel.tsx index 2906d5f140..c2963dd530 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/panels/MinimapPanel/MinimapPanel.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/panels/MinimapPanel/MinimapPanel.tsx @@ -1,6 +1,5 @@ import type { SystemStyleObject } from '@chakra-ui/react'; import { chakra, Flex } from '@chakra-ui/react'; -import type { RootState } from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; import { memo } from 'react'; import { MiniMap } from 'reactflow'; @@ -18,7 +17,7 @@ const minimapStyles: SystemStyleObject = { const MinimapPanel = () => { const shouldShowMinimapPanel = useAppSelector( - (state: RootState) => state.nodes.shouldShowMinimapPanel + (s) => s.nodes.shouldShowMinimapPanel ); return ( diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopRightPanel/WorkflowEditorSettings.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopRightPanel/WorkflowEditorSettings.tsx index 8a347c534d..a5bc38af52 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopRightPanel/WorkflowEditorSettings.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopRightPanel/WorkflowEditorSettings.tsx @@ -14,10 +14,12 @@ import { InvSwitch } from 'common/components/InvSwitch/wrapper'; import ReloadNodeTemplatesButton from 'features/nodes/components/flow/panels/TopRightPanel/ReloadSchemaButton'; import { selectionModeChanged, - selectNodesSlice, shouldAnimateEdgesChanged, + selectNodesSlice, + shouldAnimateEdgesChanged, shouldColorEdgesChanged, shouldSnapToGridChanged, - shouldValidateGraphChanged } from 'features/nodes/store/nodesSlice'; + shouldValidateGraphChanged, +} from 'features/nodes/store/nodesSlice'; import type { ChangeEvent, ReactNode } from 'react'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/nodes/components/sidePanel/workflow/WorkflowGeneralTab.tsx b/invokeai/frontend/web/src/features/nodes/components/sidePanel/workflow/WorkflowGeneralTab.tsx index a54f25f8de..1da3363375 100644 --- a/invokeai/frontend/web/src/features/nodes/components/sidePanel/workflow/WorkflowGeneralTab.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/sidePanel/workflow/WorkflowGeneralTab.tsx @@ -7,13 +7,15 @@ import { InvInput } from 'common/components/InvInput/InvInput'; import { InvTextarea } from 'common/components/InvTextarea/InvTextarea'; import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent'; import { - selectWorkflowSlice, workflowAuthorChanged, + selectWorkflowSlice, + workflowAuthorChanged, workflowContactChanged, workflowDescriptionChanged, workflowNameChanged, workflowNotesChanged, workflowTagsChanged, - workflowVersionChanged } from 'features/nodes/store/workflowSlice'; + workflowVersionChanged, +} from 'features/nodes/store/workflowSlice'; import type { ChangeEvent } from 'react'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/nodes/hooks/useBuildNode.ts b/invokeai/frontend/web/src/features/nodes/hooks/useBuildNode.ts index 7368074f4b..9628a00fca 100644 --- a/invokeai/frontend/web/src/features/nodes/hooks/useBuildNode.ts +++ b/invokeai/frontend/web/src/features/nodes/hooks/useBuildNode.ts @@ -19,9 +19,7 @@ export const SHARED_NODE_PROPERTIES: Partial = { }; export const useBuildNode = () => { - const nodeTemplates = useAppSelector( - (s) => s.nodeTemplates.templates - ); + const nodeTemplates = useAppSelector((s) => s.nodeTemplates.templates); const flow = useReactFlow(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Advanced/ParamClipSkip.tsx b/invokeai/frontend/web/src/features/parameters/components/Advanced/ParamClipSkip.tsx index e13847d45d..4588f34165 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Advanced/ParamClipSkip.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Advanced/ParamClipSkip.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSlider } from 'common/components/InvSlider/InvSlider'; @@ -8,11 +7,9 @@ import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; const ParamClipSkip = () => { - const clipSkip = useAppSelector( - (state: RootState) => state.generation.clipSkip - ); + const clipSkip = useAppSelector((s) => s.generation.clipSkip); - const { model } = useAppSelector((state: RootState) => state.generation); + const { model } = useAppSelector((s) => s.generation); const dispatch = useAppDispatch(); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceMode.tsx b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceMode.tsx index 0f49c0a546..1c021e2a28 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceMode.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceMode.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSelect } from 'common/components/InvSelect/InvSelect'; @@ -14,7 +13,7 @@ import { useTranslation } from 'react-i18next'; const ParamCanvasCoherenceMode = () => { const dispatch = useAppDispatch(); const canvasCoherenceMode = useAppSelector( - (state: RootState) => state.generation.canvasCoherenceMode + (s) => s.generation.canvasCoherenceMode ); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceSteps.tsx b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceSteps.tsx index 39e4127565..a8a79e6112 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceSteps.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceSteps.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSlider } from 'common/components/InvSlider/InvSlider'; @@ -9,7 +8,7 @@ import { useTranslation } from 'react-i18next'; const ParamCanvasCoherenceSteps = () => { const dispatch = useAppDispatch(); const canvasCoherenceSteps = useAppSelector( - (state: RootState) => state.generation.canvasCoherenceSteps + (s) => s.generation.canvasCoherenceSteps ); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceStrength.tsx b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceStrength.tsx index e8ff07c3d0..9a6b069e62 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceStrength.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/CoherencePass/ParamCanvasCoherenceStrength.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSlider } from 'common/components/InvSlider/InvSlider'; @@ -9,7 +8,7 @@ import { useTranslation } from 'react-i18next'; const ParamCanvasCoherenceStrength = () => { const dispatch = useAppDispatch(); const canvasCoherenceStrength = useAppSelector( - (state: RootState) => state.generation.canvasCoherenceStrength + (s) => s.generation.canvasCoherenceStrength ); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlur.tsx b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlur.tsx index 8e7b244183..7a7086e9aa 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlur.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlur.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSlider } from 'common/components/InvSlider/InvSlider'; @@ -8,9 +7,7 @@ import { useTranslation } from 'react-i18next'; const ParamMaskBlur = () => { const dispatch = useAppDispatch(); - const maskBlur = useAppSelector( - (state: RootState) => state.generation.maskBlur - ); + const maskBlur = useAppSelector((s) => s.generation.maskBlur); const { t } = useTranslation(); const handleChange = useCallback( diff --git a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlurMethod.tsx b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlurMethod.tsx index f6f0244634..9c864fd758 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlurMethod.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Canvas/Compositing/MaskAdjustment/ParamMaskBlurMethod.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSelect } from 'common/components/InvSelect/InvSelect'; @@ -17,9 +16,7 @@ const options: InvSelectOption[] = [ ]; const ParamMaskBlurMethod = () => { - const maskBlurMethod = useAppSelector( - (state: RootState) => state.generation.maskBlurMethod - ); + const maskBlurMethod = useAppSelector((s) => s.generation.maskBlurMethod); const dispatch = useAppDispatch(); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx b/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx index e44dc35cdf..efe8fb6fad 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx @@ -16,8 +16,7 @@ import { useTranslation } from 'react-i18next'; export const ParamPositivePrompt = memo(() => { const dispatch = useAppDispatch(); const prompt = useAppSelector((s) => s.generation.positivePrompt); - const baseModel = useAppSelector((s) => s.generation.model) - ?.base_model; + const baseModel = useAppSelector((s) => s.generation.model)?.base_model; const textareaRef = useRef(null); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedRandomize.tsx b/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedRandomize.tsx index b01d964820..07cbe2649c 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedRandomize.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedRandomize.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSwitch } from 'common/components/InvSwitch/wrapper'; @@ -12,7 +11,7 @@ export const ParamSeedRandomize = memo(() => { const { t } = useTranslation(); const shouldRandomizeSeed = useAppSelector( - (state: RootState) => state.generation.shouldRandomizeSeed + (s) => s.generation.shouldRandomizeSeed ); const handleChangeShouldRandomizeSeed = useCallback( diff --git a/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedShuffle.tsx b/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedShuffle.tsx index a2c0cdb0a0..a8f805824d 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedShuffle.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Seed/ParamSeedShuffle.tsx @@ -1,5 +1,4 @@ import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants'; -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvButton } from 'common/components/InvButton/InvButton'; import randomInt from 'common/util/randomInt'; @@ -11,7 +10,7 @@ import { FaShuffle } from 'react-icons/fa6'; export const ParamSeedShuffle = memo(() => { const dispatch = useAppDispatch(); const shouldRandomizeSeed = useAppSelector( - (state: RootState) => state.generation.shouldRandomizeSeed + (s) => s.generation.shouldRandomizeSeed ); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryHorizontal.tsx b/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryHorizontal.tsx index 2c9f39df36..c4daf8a366 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryHorizontal.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryHorizontal.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSlider } from 'common/components/InvSlider/InvSlider'; @@ -8,10 +7,10 @@ import { useTranslation } from 'react-i18next'; const ParamSymmetryHorizontal = () => { const horizontalSymmetrySteps = useAppSelector( - (state: RootState) => state.generation.horizontalSymmetrySteps + (s) => s.generation.horizontalSymmetrySteps ); - const steps = useAppSelector((state: RootState) => state.generation.steps); + const steps = useAppSelector((s) => s.generation.steps); const dispatch = useAppDispatch(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryToggle.tsx b/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryToggle.tsx index f7d452eed4..e408af90e5 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryToggle.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryToggle.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSwitch } from 'common/components/InvSwitch/wrapper'; @@ -8,7 +7,7 @@ import { memo, useCallback } from 'react'; const ParamSymmetryToggle = () => { const shouldUseSymmetry = useAppSelector( - (state: RootState) => state.generation.shouldUseSymmetry + (s) => s.generation.shouldUseSymmetry ); const dispatch = useAppDispatch(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryVertical.tsx b/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryVertical.tsx index 6956e947f6..f6f2dc150d 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryVertical.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Symmetry/ParamSymmetryVertical.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InvControl } from 'common/components/InvControl/InvControl'; import { InvSlider } from 'common/components/InvSlider/InvSlider'; @@ -8,10 +7,10 @@ import { useTranslation } from 'react-i18next'; const ParamSymmetryVertical = () => { const verticalSymmetrySteps = useAppSelector( - (state: RootState) => state.generation.verticalSymmetrySteps + (s) => s.generation.verticalSymmetrySteps ); - const steps = useAppSelector((state: RootState) => state.generation.steps); + const steps = useAppSelector((s) => s.generation.steps); const dispatch = useAppDispatch(); diff --git a/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamRealESRGANModel.tsx b/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamRealESRGANModel.tsx index b82a28718c..c973b20f03 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamRealESRGANModel.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamRealESRGANModel.tsx @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import type { GroupBase } from 'chakra-react-select'; import { InvControl } from 'common/components/InvControl/InvControl'; @@ -52,7 +51,7 @@ const ParamESRGANModel = () => { const { t } = useTranslation(); const esrganModelName = useAppSelector( - (state: RootState) => state.postprocessing.esrganModelName + (s) => s.postprocessing.esrganModelName ); const dispatch = useAppDispatch(); diff --git a/invokeai/frontend/web/src/features/queue/components/InvokeQueueBackButton.tsx b/invokeai/frontend/web/src/features/queue/components/InvokeQueueBackButton.tsx index 5b54a58520..800c2a205d 100644 --- a/invokeai/frontend/web/src/features/queue/components/InvokeQueueBackButton.tsx +++ b/invokeai/frontend/web/src/features/queue/components/InvokeQueueBackButton.tsx @@ -6,7 +6,10 @@ import { InvButton } from 'common/components/InvButton/InvButton'; import { InvNumberInput } from 'common/components/InvNumberInput/InvNumberInput'; import type { InvNumberInputFieldProps } from 'common/components/InvNumberInput/types'; import { selectDynamicPromptsSlice } from 'features/dynamicPrompts/store/dynamicPromptsSlice'; -import { selectGenerationSlice, setIterations } from 'features/parameters/store/generationSlice'; +import { + selectGenerationSlice, + setIterations, +} from 'features/parameters/store/generationSlice'; import { useQueueBack } from 'features/queue/hooks/useQueueBack'; import { selectConfigSlice } from 'features/system/store/configSlice'; import { memo, useCallback } from 'react'; diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLRefiner/ParamSDXLRefinerScheduler.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLRefiner/ParamSDXLRefinerScheduler.tsx index 746e156894..5064dabfc6 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLRefiner/ParamSDXLRefinerScheduler.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLRefiner/ParamSDXLRefinerScheduler.tsx @@ -11,9 +11,7 @@ import { useTranslation } from 'react-i18next'; const ParamSDXLRefinerScheduler = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); - const refinerScheduler = useAppSelector( - (s) => s.sdxl.refinerScheduler - ); + const refinerScheduler = useAppSelector((s) => s.sdxl.refinerScheduler); const onChange = useCallback( (v) => { diff --git a/invokeai/frontend/web/src/features/settingsAccordions/ImageSettingsAccordion/ImageSizeLinear.tsx b/invokeai/frontend/web/src/features/settingsAccordions/ImageSettingsAccordion/ImageSizeLinear.tsx index 371e16345b..0aee28ee31 100644 --- a/invokeai/frontend/web/src/features/settingsAccordions/ImageSettingsAccordion/ImageSizeLinear.tsx +++ b/invokeai/frontend/web/src/features/settingsAccordions/ImageSettingsAccordion/ImageSizeLinear.tsx @@ -14,9 +14,7 @@ export const ImageSizeLinear = memo(() => { const dispatch = useAppDispatch(); const width = useAppSelector((s) => s.generation.width); const height = useAppSelector((s) => s.generation.height); - const aspectRatioState = useAppSelector( - (s) => s.generation.aspectRatio - ); + const aspectRatioState = useAppSelector((s) => s.generation.aspectRatio); const onChangeWidth = useCallback( (width: number) => { diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsLogLevelSelect.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsLogLevelSelect.tsx index 0b1b8d08c9..d5a7fd2e3d 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsLogLevelSelect.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsLogLevelSelect.tsx @@ -10,12 +10,8 @@ import { useTranslation } from 'react-i18next'; export const SettingsLogLevelSelect = memo(() => { const { t } = useTranslation(); const dispatch = useAppDispatch(); - const consoleLogLevel = useAppSelector( - (s) => s.system.consoleLogLevel - ); - const shouldLogToConsole = useAppSelector( - (s) => s.system.shouldLogToConsole - ); + const consoleLogLevel = useAppSelector((s) => s.system.consoleLogLevel); + const shouldLogToConsole = useAppSelector((s) => s.system.shouldLogToConsole); const options = useMemo( () => zLogLevel.options.map((o) => ({ label: o, value: o })), [] diff --git a/invokeai/frontend/web/src/features/system/hooks/useFeatureStatus.ts b/invokeai/frontend/web/src/features/system/hooks/useFeatureStatus.ts index bd7fb6d5c7..f052c23335 100644 --- a/invokeai/frontend/web/src/features/system/hooks/useFeatureStatus.ts +++ b/invokeai/frontend/web/src/features/system/hooks/useFeatureStatus.ts @@ -1,4 +1,3 @@ -import type { RootState } from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; import type { AppFeature, SDFeature } from 'app/types/invokeai'; import type { InvokeTabName } from 'features/ui/store/tabMap'; @@ -7,17 +6,11 @@ import { useMemo } from 'react'; export const useFeatureStatus = ( feature: AppFeature | SDFeature | InvokeTabName ) => { - const disabledTabs = useAppSelector( - (state: RootState) => state.config.disabledTabs - ); + const disabledTabs = useAppSelector((s) => s.config.disabledTabs); - const disabledFeatures = useAppSelector( - (state: RootState) => state.config.disabledFeatures - ); + const disabledFeatures = useAppSelector((s) => s.config.disabledFeatures); - const disabledSDFeatures = useAppSelector( - (state: RootState) => state.config.disabledSDFeatures - ); + const disabledSDFeatures = useAppSelector((s) => s.config.disabledSDFeatures); const isFeatureDisabled = useMemo( () => diff --git a/invokeai/frontend/web/src/features/ui/components/ParametersPanel.tsx b/invokeai/frontend/web/src/features/ui/components/ParametersPanel.tsx index db2d21fa34..465e89d5f0 100644 --- a/invokeai/frontend/web/src/features/ui/components/ParametersPanel.tsx +++ b/invokeai/frontend/web/src/features/ui/components/ParametersPanel.tsx @@ -1,5 +1,4 @@ import { Box, Flex } from '@chakra-ui/react'; -import type { RootState } from 'app/store/store'; import { useAppSelector } from 'app/store/storeHooks'; import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants'; import { Prompts } from 'features/parameters/components/Prompts/Prompts'; @@ -24,7 +23,7 @@ const overlayScrollbarsStyles: CSSProperties = { const ParametersPanel = () => { const activeTabName = useAppSelector(activeTabNameSelector); const isSDXL = useAppSelector( - (state: RootState) => state.generation.model?.base_model === 'sdxl' + (s) => s.generation.model?.base_model === 'sdxl' ); return (