import { useRouter } from "next/router"; import { useState } from "react"; import { useForm } from "react-hook-form"; import { Toaster } from "react-hot-toast"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button, Form, TextField } from "@calcom/ui/components"; import { Alert } from "@calcom/ui/v2"; export default function CalDavCalendarSetup() { const { t } = useLocale(); const router = useRouter(); const form = useForm({ defaultValues: { url: "", username: "", password: "", }, }); const [errorMessage, setErrorMessage] = useState(""); return (