place dispatch within existing handler for individdual component selection

This commit is contained in:
Jibran Absarulislam 2023-06-16 03:06:16 -04:00
parent 3647815f0f
commit 02c31c911d

View file

@ -32,6 +32,8 @@ import {
selectAddress,
selectIsInspecting,
selectLayout,
setZoom100,
restoreZoom,
selectRotate,
selectZoomFactor,
setAddress,
@ -199,8 +201,10 @@ const Device = ({ isPrimary, device, setIndividualDevice }: Props) => {
if (!isIndividualLayout) {
dispatch(setLayout(PREVIEW_LAYOUTS.INDIVIDUAL));
setIndividualDevice(selectedDevice);
dispatch(setZoom100());
} else {
dispatch(setLayout(PREVIEW_LAYOUTS.COLUMN));
dispatch(restoreZoom());
}
};