Don't always advance to next Stay Aligned setup step on reset

This commit is contained in:
Sapphire
2026-03-06 02:10:34 -06:00
parent b829a20169
commit 4fe1ece010
2 changed files with 15 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import { ResetType } from 'solarxr-protocol';
export function PreparationStep({
nextStep,
prevStep,
isActive,
}: VerticalStepComponentProps) {
return (
<div className="flex flex-col flex-grow justify-between py-2 gap-2">
@@ -53,7 +54,14 @@ export function PreparationStep({
<Button variant={'secondary'} onClick={prevStep} />
</Localized>
<ResetButton type={ResetType.Full} onReseted={nextStep} />
<ResetButton
type={ResetType.Full}
onReseted={() => {
if (isActive) {
nextStep();
}
}}
/>
</div>
</div>
);

View File

@@ -10,6 +10,7 @@ import { ManualMountingPageStayAligned } from '@/components/onboarding/pages/mou
export function VerifyMountingStep({
nextStep,
prevStep,
isActive,
}: VerticalStepComponentProps) {
const { isMobile } = useBreakpoint('mobile');
const [isOpen, setOpen] = useState(false);
@@ -79,7 +80,11 @@ export function VerifyMountingStep({
onClick={() => setDisableMounting(true)}
type={ResetType.Mounting}
group="default"
onReseted={goNextStep}
onReseted={() => {
if (isActive) {
nextStep();
}
}}
onFailed={() => setDisableMounting(false)}
/>
</div>