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

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/3366/head
noobyogi0010 2022-07-22 21:34:40 +05:30 committed by GitHub
parent c0c0bbccf7
commit e82bcb6dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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"
/>