diff --git a/apps/web/components/getting-started/steps-views/UserProfile.tsx b/apps/web/components/getting-started/steps-views/UserProfile.tsx index 455d04a245..1cb8f91ea1 100644 --- a/apps/web/components/getting-started/steps-views/UserProfile.tsx +++ b/apps/web/components/getting-started/steps-views/UserProfile.tsx @@ -1,15 +1,19 @@ import { ArrowRightIcon } from "@heroicons/react/solid"; +import MarkdownIt from "markdown-it"; import { useRouter } from "next/router"; import { FormEvent, useRef, useState } from "react"; import { useForm } from "react-hook-form"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import turndownService from "@calcom/lib/turndownService"; import { trpc } from "@calcom/trpc/react"; -import { Button, ImageUploader, showToast, TextArea } from "@calcom/ui"; +import { Button, Editor, ImageUploader, Label, showToast } from "@calcom/ui"; import { Avatar } from "@calcom/ui"; import type { IOnboardingPageProps } from "../../../pages/getting-started/[[...step]]"; +const md = new MarkdownIt("default", { html: true, breaks: true }); + type FormData = { bio: string; }; @@ -21,13 +25,10 @@ const UserProfile = (props: IUserProfileProps) => { const { user } = props; const { t } = useLocale(); const avatarRef = useRef(null!); - const bioRef = useRef(null); - const { - register, - setValue, - handleSubmit, - formState: { errors }, - } = useForm({ defaultValues: { bio: user?.bio || "" } }); + const { setValue, handleSubmit, getValues } = useForm({ + defaultValues: { bio: user?.bio || "" }, + }); + const { data: eventTypes } = trpc.viewer.eventTypes.list.useQuery(); const [imageSrc, setImageSrc] = useState(user?.avatar || ""); const utils = trpc.useContext(); @@ -138,25 +139,12 @@ const UserProfile = (props: IUserProfileProps) => {
- -