mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): more memoization
This commit is contained in:
committed by
Kent Keirsey
parent
10fd4f6a61
commit
3ce8f3d6fe
@ -1,6 +1,7 @@
|
||||
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';
|
||||
import { InvSwitch } from 'common/components/InvSwitch/wrapper';
|
||||
import { setHrfEnabled } from 'features/hrf/store/hrfSlice';
|
||||
import type { ChangeEvent } from 'react';
|
||||
@ -22,10 +23,12 @@ export default function ParamHrfToggle() {
|
||||
return (
|
||||
<InvControl
|
||||
label={t('hrf.enableHrf')}
|
||||
labelProps={{ flexGrow: 1 }}
|
||||
labelProps={labelProps}
|
||||
w="full"
|
||||
>
|
||||
<InvSwitch isChecked={hrfEnabled} onChange={handleHrfEnabled} />
|
||||
</InvControl>
|
||||
);
|
||||
}
|
||||
|
||||
const labelProps: InvLabelProps = { flexGrow: 1 };
|
Reference in New Issue
Block a user