Skip to content

Commit d425661

Browse files
committed
feat(password): apply backend logic to all password set fields
1 parent 0b346d3 commit d425661

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

site/src/pages/CreateUserPage/CreateUserForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const CreateUserForm: FC<
108108

109109
useEffect(() => {
110110
onPasswordChange?.(form.values.password);
111-
}, [form.values.password]); // Run effect when password changes
111+
}, [form.values.password, onPasswordChange]); // Run effect when password changes
112112

113113

114114
const methods = [

site/src/pages/SetupPage/SetupPageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const SetupPageView: FC<SetupPageViewProps> = ({
124124

125125
useEffect(() => {
126126
onPasswordChange?.(form.values.password);
127-
}, [form.values.password]); // Run effect when password changes
127+
}, [form.values.password, onPasswordChange]); // Run effect when password changes
128128

129129
return (
130130
<SignInLayout>

site/src/pages/UserSettingsPage/SecurityPage/SecurityForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const SecurityForm: FC<SecurityFormProps> = ({
7878

7979
useEffect(() => {
8080
onPasswordChange(form.values.password);
81-
}, [form.values.password]);
81+
}, [form.values.password, onPasswordChange]);
8282

8383
return (
8484
<>

site/src/pages/UserSettingsPage/SecurityPage/SecurityPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { displaySuccess } from "components/GlobalSnackbar/utils";
44
import { Loader } from "components/Loader/Loader";
55
import { Stack } from "components/Stack/Stack";
66
import { useAuthenticated } from "contexts/auth/RequireAuth";
7-
import { type ComponentProps, FC, useState } from "react";
7+
import { type ComponentProps, type FC, useState } from "react";
88
import { useMutation, useQuery } from "react-query";
99
import { Section } from "../Section";
1010
import { SecurityForm } from "./SecurityForm";

0 commit comments

Comments
 (0)