import React from "react"; import Link from "next/link"; import { useForm, Controller } from "react-hook-form"; // ui import { Input, Button } from "@plane/ui"; // icons import { XCircle } from "lucide-react"; // services import { AuthService } from "services/auth.service"; const authService = new AuthService(); export interface InstanceSetupPasswordFormValues { email: string; password: string; } export interface IInstanceSetupPasswordForm { email: string; onNextStep: () => void; resetSteps: () => void; } export const InstanceSetupPasswordForm: React.FC = (props) => { const { onNextStep, email, resetSteps } = props; // form info const { control, handleSubmit, formState: { errors, isSubmitting }, } = useForm({ defaultValues: { email, password: "", }, mode: "onChange", reValidateMode: "onChange", }); const handlePasswordSubmit = (formData: InstanceSetupPasswordFormValues) => authService.setInstanceAdminPassword({ password: formData.password }).then(() => { onNextStep(); }); return (

Moving to the runway

Let{"'"}s set a password so you can do away with codes.

/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test( value ) || "Email address is not valid", }} render={({ field: { value, onChange } }) => (
resetSteps()} />
)} />
(
)} />

Whatever you choose now will be your account{"'"}s password

When you click the button above, you agree with our{" "} terms and conditions of service.

); };