import { useAppDispatch } from 'app/store/storeHooks'; import IAISlider from 'common/components/IAISlider'; import { ControlNetConfig, controlNetWeightChanged, } from 'features/controlNet/store/controlNetSlice'; import { memo, useCallback } from 'react'; type ParamControlNetWeightProps = { controlNet: ControlNetConfig; }; const ParamControlNetWeight = (props: ParamControlNetWeightProps) => { const { weight, isEnabled, controlNetId } = props.controlNet; const dispatch = useAppDispatch(); const handleWeightChanged = useCallback( (weight: number) => { dispatch(controlNetWeightChanged({ controlNetId, weight })); }, [controlNetId, dispatch] ); return ( ); }; export default memo(ParamControlNetWeight);