diff --git a/invokeai/frontend/web/src/features/queue/components/ClearQueueIconButton.tsx b/invokeai/frontend/web/src/features/queue/components/ClearQueueIconButton.tsx index 2d6904e783..f7eed47663 100644 --- a/invokeai/frontend/web/src/features/queue/components/ClearQueueIconButton.tsx +++ b/invokeai/frontend/web/src/features/queue/components/ClearQueueIconButton.tsx @@ -5,13 +5,16 @@ import ClearQueueConfirmationAlertDialog from 'features/queue/components/ClearQu import { useCancelCurrentQueueItem } from 'features/queue/hooks/useCancelCurrentQueueItem'; import { useClearQueue } from 'features/queue/hooks/useClearQueue'; import { useState } from 'react'; -import { useHotkeys } from 'react-hotkeys-hook' +import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; import { PiTrashSimpleBold } from 'react-icons/pi'; type Props = Omit; -const ClearQueueIconButton = ({ onOpen, ...props }: Props & { onOpen: () => void }) => { +const ClearQueueIconButton = ({ + onOpen, + ...props +}: Props & { onOpen: () => void }) => { const { t } = useTranslation(); const { isLoading, isDisabled } = useClearQueue(); @@ -34,11 +37,8 @@ const ClearQueueIconButton = ({ onOpen, ...props }: Props & { onOpen: () => void const ClearSingleQueueItemIconButton = (props: Props) => { const { t } = useTranslation(); - const { - cancelQueueItem, - isLoading, - isDisabled, - } = useCancelCurrentQueueItem(); + const { cancelQueueItem, isLoading, isDisabled } = + useCancelCurrentQueueItem(); return ( <> @@ -55,26 +55,33 @@ const ClearSingleQueueItemIconButton = (props: Props) => { /> ); -} +}; export const ClearQueueButton = (props: Props) => { // Show the single item clear button when shift is pressed // Otherwise show the clear queue button - const [showSingleItemClear, setShowSingleItemClear] = useState(true) - useHotkeys('shift', () => setShowSingleItemClear(false), { keydown: true, keyup: false }) - useHotkeys('shift', () => setShowSingleItemClear(true), { keydown: false, keyup: true }); + const [showSingleItemClear, setShowSingleItemClear] = useState(true); + useHotkeys('shift', () => setShowSingleItemClear(false), { + keydown: true, + keyup: false, + }); + useHotkeys('shift', () => setShowSingleItemClear(true), { + keydown: false, + keyup: true, + }); - const disclosure = useDisclosure() + const disclosure = useDisclosure(); return ( <> - {showSingleItemClear - ? - : - } + {showSingleItemClear ? ( + + ) : ( + + )} - ) -} + ); +}; export default ClearQueueButton; diff --git a/invokeai/frontend/web/src/features/queue/components/QueueActionsMenuButton.tsx b/invokeai/frontend/web/src/features/queue/components/QueueActionsMenuButton.tsx index 8d7d1315bc..eee40cc7eb 100644 --- a/invokeai/frontend/web/src/features/queue/components/QueueActionsMenuButton.tsx +++ b/invokeai/frontend/web/src/features/queue/components/QueueActionsMenuButton.tsx @@ -26,7 +26,7 @@ export const QueueActionsMenuButton = memo(() => { const { isOpen, onOpen, onClose } = useDisclosure(); const dispatch = useAppDispatch(); const { t } = useTranslation(); - const clearQueueDisclosure = useDisclosure() + const clearQueueDisclosure = useDisclosure(); const isPauseEnabled = useFeatureStatus('pauseQueue').isFeatureEnabled; const isResumeEnabled = useFeatureStatus('resumeQueue').isFeatureEnabled; const { queueSize } = useGetQueueStatusQuery(undefined, { @@ -36,10 +36,8 @@ export const QueueActionsMenuButton = memo(() => { : 0, }), }); - const { - isLoading: isLoadingClearQueue, - isDisabled: isDisabledClearQueue, - } = useClearQueue(); + const { isLoading: isLoadingClearQueue, isDisabled: isDisabledClearQueue } = + useClearQueue(); const { resumeProcessor, isLoading: isLoadingResumeProcessor,