Harsh/fix bookings name (#5848)
Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <root@pop-os.localdomain> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/5884/head
parent
2120e301c3
commit
38a5a22b9e
|
@ -178,12 +178,16 @@ export default function Success(props: SuccessProps) {
|
||||||
console.error(`No location found `);
|
console.error(`No location found `);
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = props.bookingInfo?.user?.name;
|
|
||||||
const email = props.bookingInfo?.user?.email;
|
const email = props.bookingInfo?.user?.email;
|
||||||
const status = props.bookingInfo?.status;
|
const status = props.bookingInfo?.status;
|
||||||
const reschedule = props.bookingInfo.status === BookingStatus.ACCEPTED;
|
const reschedule = props.bookingInfo.status === BookingStatus.ACCEPTED;
|
||||||
const cancellationReason = props.bookingInfo.cancellationReason;
|
const cancellationReason = props.bookingInfo.cancellationReason;
|
||||||
|
|
||||||
|
const attendeeName =
|
||||||
|
typeof props?.bookingInfo?.attendees?.[0]?.name === "string"
|
||||||
|
? props?.bookingInfo?.attendees?.[0]?.name
|
||||||
|
: "Nameless";
|
||||||
|
|
||||||
const [is24h, setIs24h] = useState(isBrowserLocale24h());
|
const [is24h, setIs24h] = useState(isBrowserLocale24h());
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
|
|
||||||
|
@ -205,8 +209,6 @@ export default function Success(props: SuccessProps) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const attendeeName = typeof name === "string" ? name : "Nameless";
|
|
||||||
|
|
||||||
const eventNameObject = {
|
const eventNameObject = {
|
||||||
attendeeName,
|
attendeeName,
|
||||||
eventType: props.eventType.title,
|
eventType: props.eventType.title,
|
||||||
|
|
Loading…
Reference in New Issue