fixes #3336 - Avatar on New Event Type (#3465)

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
authored and GitHub committed 2022-07-22 10:04:40 -06:00
1 parent c0c0bbccf7
commit e82bcb6dba
1 file changed
+2 -1
@@ -6,6 +6,7 @@ import { useEffect } from "react";
import { useForm } from "react-hook-form";
import type { z } from "zod";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import showToast from "@calcom/lib/notification";
import { createEventTypeInput } from "@calcom/prisma/zod/custom/eventtype";
@@ -164,7 +165,7 @@ export default function CreateEventTypeButton(props: Props) {
onSelect={() => openModal(option)}>
<Avatar
alt={option.name || ""}
imageSrc={option.image}
imageSrc={option.image || `${WEBAPP_URL}/${option.slug}/avatar.png`} // if no image, use default avatar
size={6}
className="inline ltr:mr-2 rtl:ml-2"
/>