mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: lint fixes
This commit is contained in:
parent
d52a096607
commit
e60af40c8d
@ -12,12 +12,12 @@ import { languageSelector } from 'features/system/store/systemSelectors';
|
|||||||
import InvokeTabs from 'features/ui/components/InvokeTabs';
|
import InvokeTabs from 'features/ui/components/InvokeTabs';
|
||||||
import i18n from 'i18n';
|
import i18n from 'i18n';
|
||||||
import { size } from 'lodash-es';
|
import { size } from 'lodash-es';
|
||||||
import { ReactNode, memo, useCallback, useEffect, useMemo } from 'react';
|
import { ReactNode, memo, useCallback, useEffect } from 'react';
|
||||||
import { ErrorBoundary } from 'react-error-boundary';
|
import { ErrorBoundary } from 'react-error-boundary';
|
||||||
|
import { usePreselectedImage } from '../../features/parameters/hooks/usePreselectedImage';
|
||||||
import AppErrorBoundaryFallback from './AppErrorBoundaryFallback';
|
import AppErrorBoundaryFallback from './AppErrorBoundaryFallback';
|
||||||
import GlobalHotkeys from './GlobalHotkeys';
|
import GlobalHotkeys from './GlobalHotkeys';
|
||||||
import Toaster from './Toaster';
|
import Toaster from './Toaster';
|
||||||
import { usePreselectedImage } from '../../features/parameters/hooks/usePreselectedImage';
|
|
||||||
|
|
||||||
const DEFAULT_CONFIG = {};
|
const DEFAULT_CONFIG = {};
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { skipToken } from '@reduxjs/toolkit/dist/query';
|
import { skipToken } from '@reduxjs/toolkit/dist/query';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { t } from 'i18next';
|
||||||
|
import { useCallback, useState } from 'react';
|
||||||
|
import { useAppToaster } from '../../../app/components/Toaster';
|
||||||
|
import { useAppDispatch } from '../../../app/store/storeHooks';
|
||||||
import {
|
import {
|
||||||
useGetImageDTOQuery,
|
useGetImageDTOQuery,
|
||||||
useGetImageMetadataQuery,
|
useGetImageMetadataQuery,
|
||||||
} from '../../../services/api/endpoints/images';
|
} from '../../../services/api/endpoints/images';
|
||||||
import { useAppDispatch } from '../../../app/store/storeHooks';
|
|
||||||
import { setInitialCanvasImage } from '../../canvas/store/canvasSlice';
|
import { setInitialCanvasImage } from '../../canvas/store/canvasSlice';
|
||||||
import { setActiveTab } from '../../ui/store/uiSlice';
|
import { setActiveTab } from '../../ui/store/uiSlice';
|
||||||
import { useRecallParameters } from './useRecallParameters';
|
|
||||||
import { initialImageSelected } from '../store/actions';
|
import { initialImageSelected } from '../store/actions';
|
||||||
import { useAppToaster } from '../../../app/components/Toaster';
|
import { useRecallParameters } from './useRecallParameters';
|
||||||
import { t } from 'i18next';
|
|
||||||
|
|
||||||
type SelectedImage = {
|
type SelectedImage = {
|
||||||
imageName: string;
|
imageName: string;
|
||||||
@ -26,7 +26,7 @@ export const usePreselectedImage = () => {
|
|||||||
const { recallAllParameters } = useRecallParameters();
|
const { recallAllParameters } = useRecallParameters();
|
||||||
const toaster = useAppToaster();
|
const toaster = useAppToaster();
|
||||||
|
|
||||||
const { currentData: selectedImageDto, isError } = useGetImageDTOQuery(
|
const { currentData: selectedImageDto } = useGetImageDTOQuery(
|
||||||
imageNameForDto ?? skipToken
|
imageNameForDto ?? skipToken
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -37,8 +37,8 @@ export const usePreselectedImage = () => {
|
|||||||
const handlePreselectedImage = useCallback(
|
const handlePreselectedImage = useCallback(
|
||||||
(selectedImage?: SelectedImage) => {
|
(selectedImage?: SelectedImage) => {
|
||||||
if (!selectedImage) {
|
if (!selectedImage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedImage.action === 'sendToCanvas') {
|
if (selectedImage.action === 'sendToCanvas') {
|
||||||
setImageNameForDto(selectedImage?.imageName);
|
setImageNameForDto(selectedImage?.imageName);
|
||||||
|
Loading…
Reference in New Issue
Block a user