Skip to content

Commit 3d6c9f8

Browse files
committed
Don't always advance to next Stay Aligned setup step on reset
1 parent 0236a05 commit 3d6c9f8

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

gui/src/components/onboarding/pages/stay-aligned/stay-aligned-steps/PreparationStep.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { ResetType } from 'solarxr-protocol';
1111
export function PreparationStep({
1212
nextStep,
1313
prevStep,
14+
isActive,
1415
}: VerticalStepComponentProps) {
1516
return (
1617
<div className="flex flex-col flex-grow justify-between py-2 gap-2">
@@ -53,7 +54,14 @@ export function PreparationStep({
5354
<Button variant={'secondary'} onClick={prevStep} />
5455
</Localized>
5556

56-
<ResetButton type={ResetType.Full} onReseted={nextStep} />
57+
<ResetButton
58+
type={ResetType.Full}
59+
onReseted={() => {
60+
if (isActive) {
61+
nextStep();
62+
}
63+
}}
64+
/>
5765
</div>
5866
</div>
5967
);

gui/src/components/onboarding/pages/stay-aligned/stay-aligned-steps/VerifyMounting.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ManualMountingPageStayAligned } from '@/components/onboarding/pages/mou
1010
export function VerifyMountingStep({
1111
nextStep,
1212
prevStep,
13+
isActive,
1314
}: VerticalStepComponentProps) {
1415
const { isMobile } = useBreakpoint('mobile');
1516
const [isOpen, setOpen] = useState(false);
@@ -79,7 +80,11 @@ export function VerifyMountingStep({
7980
onClick={() => setDisableMounting(true)}
8081
type={ResetType.Mounting}
8182
group="default"
82-
onReseted={goNextStep}
83+
onReseted={() => {
84+
if (isActive) {
85+
nextStep();
86+
}
87+
}}
8388
onFailed={() => setDisableMounting(false)}
8489
/>
8590
</div>

0 commit comments

Comments
 (0)