mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore(site): refactor useAuth and related hooks (#12567)
Close https://github.com/coder/coder/issues/12487
This commit is contained in:
@ -63,7 +63,7 @@ export interface CreateUserFormProps {
|
||||
onCancel: () => void;
|
||||
error?: unknown;
|
||||
isLoading: boolean;
|
||||
myOrgId: string;
|
||||
organizationId: string;
|
||||
authMethods?: TypesGen.AuthMethods;
|
||||
}
|
||||
|
||||
@ -83,14 +83,14 @@ const validationSchema = Yup.object({
|
||||
|
||||
export const CreateUserForm: FC<
|
||||
React.PropsWithChildren<CreateUserFormProps>
|
||||
> = ({ onSubmit, onCancel, error, isLoading, myOrgId, authMethods }) => {
|
||||
> = ({ onSubmit, onCancel, error, isLoading, organizationId, authMethods }) => {
|
||||
const form: FormikContextType<TypesGen.CreateUserRequest> =
|
||||
useFormik<TypesGen.CreateUserRequest>({
|
||||
initialValues: {
|
||||
email: "",
|
||||
password: "",
|
||||
username: "",
|
||||
organization_id: myOrgId,
|
||||
organization_id: organizationId,
|
||||
disable_login: false,
|
||||
login_type: "",
|
||||
},
|
||||
|
Reference in New Issue
Block a user