Files
calendar/packages/emails/src/components/UserFieldsResponses.tsx
T
8bc8a045b6 feat: email undefined value (#9240)
* Fix: #9210

* Fix: #9215 Added Password Validation to App Signup

* FIX #9216 Fixed the Update Button Allignment

* Fix #9238: Don't render descripiton in email template if undefined

* Remove Prev Changes

* Remove unwanted space

* Revert yarn.lock

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-06-06 10:03:40 +00:00

25 lines
680 B
TypeScript

import getLabelValueMapFromResponses from "@calcom/lib/getLabelValueMapFromResponses";
import type { CalendarEvent } from "@calcom/types/Calendar";
import { Info } from "./Info";
export function UserFieldsResponses(props: { calEvent: CalendarEvent }) {
const labelValueMap = getLabelValueMapFromResponses(props.calEvent);
if (!labelValueMap) return null;
return (
<>
{Object.keys(labelValueMap).map((key) =>
labelValueMap[key] !== "" ? (
<Info
key={key}
label={key}
description={`${labelValueMap[key] ? labelValueMap[key] : ""}`}
withSpacer
/>
) : null
)}
</>
);
}