Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
import { useFinishedCount, usePruneQueue } from 'features/queue/hooks/usePruneQueue';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { PiBroomBold } from 'react-icons/pi';
import QueueButton from './common/QueueButton';
type Props = {
asIconButton?: boolean;
};
const PruneQueueButton = ({ asIconButton }: Props) => {
const { t } = useTranslation();
const pruneQueue = usePruneQueue();
const finishedCount = useFinishedCount();
return (
<QueueButton
onClick={pruneQueue.trigger}
isDisabled={pruneQueue.isDisabled}
isLoading={pruneQueue.isLoading}
asIconButton={asIconButton}
label={t('queue.prune')}
tooltip={t('queue.pruneTooltip', { item_count: finishedCount })}
icon={<PiBroomBold />}
colorScheme="invokeBlue"
/>
);
};
export default memo(PruneQueueButton);