mirror of
https://github.com/soconnor0919/hristudio.git
synced 2026-03-24 03:37:51 -04:00
Fix onClick handlers passing event object to handleNextStep
The issue was that onClick={onNextStep} passes the click event as the first argument,
making targetIndex an object instead of undefined. This caused handleNextStep to fall
through to linear progression instead of properly checking branching logic.
Fixed by wrapping with arrow function: onClick={() => onNextStep()}
This commit is contained in:
@@ -188,7 +188,7 @@ export function TrialControlPanel({
|
||||
Pause
|
||||
</Button>
|
||||
<Button
|
||||
onClick={onNextStep}
|
||||
onClick={() => onNextStep()}
|
||||
disabled={currentStepIndex >= steps.length - 1}
|
||||
size="sm"
|
||||
>
|
||||
|
||||
@@ -404,7 +404,7 @@ export function WizardExecutionPanel({
|
||||
onClick={
|
||||
currentStepIndex === steps.length - 1
|
||||
? onCompleteTrial
|
||||
: onNextStep
|
||||
: () => onNextStep()
|
||||
}
|
||||
className={`w-full max-w-sm text-white shadow-lg transition-all hover:scale-[1.02] ${
|
||||
currentStepIndex === steps.length - 1
|
||||
|
||||
Reference in New Issue
Block a user