Skip to content

Commit 187ce7c

Browse files
authored
docs: fix error in password reset form (#205)
`setStep` is defined like this: ``` const [step, setStep] = useState<"forgot" | { email: string }>("forgot"); ``` But we try to set the step to `signIn` like this: ``` <button type="button" onClick={() => setStep("signIn")}> ``` And we get this error: ``` Argument of type '"signIn"' is not assignable to parameter of type 'SetStateAction<"forgot" | { email: string; }>' ``` So I just fixed the small mistake by changing `setStep("signIn")` to `setStep("forgot")`. Hope this helps :)
1 parent f9db58c commit 187ce7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/pages/config/passwords.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export function PasswordReset() {
261261
<input name="email" value={step.email} type="hidden" />
262262
<input name="flow" value="reset-verification" type="hidden" />
263263
<button type="submit">Continue</button>
264-
<button type="button" onClick={() => setStep("signIn")}>
264+
<button type="button" onClick={() => setStep("forgot")}>
265265
Cancel
266266
</button>
267267
</form>

0 commit comments

Comments
 (0)