import { ClockIcon, CreditCardIcon, UserIcon, UsersIcon } from "@heroicons/react/solid"; import { SchedulingType } from "@prisma/client"; import { Prisma } from "@prisma/client"; import React from "react"; import { FormattedNumber, IntlProvider } from "react-intl"; import classNames from "@lib/classNames"; import { useLocale } from "@lib/hooks/useLocale"; const eventTypeData = Prisma.validator()({ select: { id: true, length: true, price: true, currency: true, schedulingType: true, description: true, }, }); type EventType = Prisma.EventTypeGetPayload; export type EventTypeDescriptionProps = { eventType: EventType; className?: string; }; export const EventTypeDescription = ({ eventType, className }: EventTypeDescriptionProps) => { const { t } = useLocale(); return ( <>
{eventType.description && (

{eventType.description.substring(0, 100)} {eventType.description.length > 100 && "..."}

)}
  • {eventType.schedulingType ? (
  • ) : (
  • )} {eventType.price > 0 && (
  • )}
); }; export default EventTypeDescription;