feat(ui): remove unused iterations component

This commit is contained in:
psychedelicious 2024-01-03 07:49:03 +11:00
parent 0cefacb3a2
commit b4c0dafdc8

View File

@ -1,39 +0,0 @@
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { InvNumberInput } from 'common/components/InvNumberInput/InvNumberInput';
import type { InvNumberInputFieldProps } from 'common/components/InvNumberInput/types';
import { setIterations } from 'features/parameters/store/generationSlice';
import { memo, useCallback } from 'react';
const ParamIterations = () => {
const iterations = useAppSelector((state) => state.generation.iterations);
const dispatch = useAppDispatch();
const onChange = useCallback(
(v: number) => {
dispatch(setIterations(v));
},
[dispatch]
);
return (
<InvNumberInput
step={1}
min={1}
max={999}
onChange={onChange}
value={iterations}
h="full"
w="216px"
numberInputFieldProps={numberInputFieldProps}
/>
);
};
export default memo(ParamIterations);
const numberInputFieldProps: InvNumberInputFieldProps = {
ps: '144px',
borderInlineStartRadius: 'base',
h: 'full',
textAlign: 'center',
};