mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): memoize all components
This commit is contained in:
committed by
Kent Keirsey
parent
ca4b8e65c1
commit
56527da73e
@@ -8,7 +8,7 @@ import { InvNumberInput } from 'common/components/InvNumberInput/InvNumberInput'
|
||||
import type { InvNumberInputFieldProps } from 'common/components/InvNumberInput/types';
|
||||
import { setIterations } from 'features/parameters/store/generationSlice';
|
||||
import { useQueueBack } from 'features/queue/hooks/useQueueBack';
|
||||
import { useCallback } from 'react';
|
||||
import { memo, useCallback } from 'react';
|
||||
import { IoSparkles } from 'react-icons/io5';
|
||||
|
||||
import { QueueButtonTooltip } from './QueueButtonTooltip';
|
||||
@@ -40,7 +40,7 @@ const selector = createMemoizedSelector([stateSelector], (state) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const InvokeQueueBackButton = () => {
|
||||
export const InvokeQueueBackButton = memo(() => {
|
||||
const { queueBack, isLoading, isDisabled } = useQueueBack();
|
||||
const { iterations, step, fineStep } = useAppSelector(selector);
|
||||
const dispatch = useAppDispatch();
|
||||
@@ -89,4 +89,6 @@ export const InvokeQueueBackButton = () => {
|
||||
</InvButton>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
InvokeQueueBackButton.displayName = 'InvokeQueueBackButton';
|
||||
|
||||
Reference in New Issue
Block a user