Merge branch 'main' into web3

pull/1439/head
kodiakhq[bot] 2022-01-08 16:54:46 +00:00 committed by GitHub
commit cf8f43ee6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -185,6 +185,14 @@ const BookingPage = (props: BookingPageProps) => {
}
};
const parseDate = (date: string | null) => {
if (!date) return "No date";
const parsedZone = parseZone(date);
if (!parsedZone?.isValid()) return "Invalid date";
const formattedTime = parsedZone?.format(timeFormat);
return formattedTime + ", " + dayjs(date).toDate().toLocaleString(i18n.language, { dateStyle: "full" });
};
const bookEvent = (booking: BookingFormValues) => {
telemetry.withJitsu((jitsu) =>
jitsu.track(telemetryEventTypes.bookingConfirmed, collectPageParameters())
@ -286,10 +294,7 @@ const BookingPage = (props: BookingPageProps) => {
)}
<p className="mb-4 text-green-500">
<CalendarIcon className="inline-block w-4 h-4 mr-1 -mt-1" />
{(date && parseZone(date)?.format(timeFormat)) ||
"No date" +
", " +
dayjs(date).toDate().toLocaleString(i18n.language, { dateStyle: "full" })}
{parseDate(date)}
</p>
{props.eventType.smartContractAddress && (
<p className="px-2 py-1 mb-1 -ml-2 text-gray-500">