Merge branch 'main' into web3
commit
cf8f43ee6d
|
@ -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) => {
|
const bookEvent = (booking: BookingFormValues) => {
|
||||||
telemetry.withJitsu((jitsu) =>
|
telemetry.withJitsu((jitsu) =>
|
||||||
jitsu.track(telemetryEventTypes.bookingConfirmed, collectPageParameters())
|
jitsu.track(telemetryEventTypes.bookingConfirmed, collectPageParameters())
|
||||||
|
@ -286,10 +294,7 @@ const BookingPage = (props: BookingPageProps) => {
|
||||||
)}
|
)}
|
||||||
<p className="mb-4 text-green-500">
|
<p className="mb-4 text-green-500">
|
||||||
<CalendarIcon className="inline-block w-4 h-4 mr-1 -mt-1" />
|
<CalendarIcon className="inline-block w-4 h-4 mr-1 -mt-1" />
|
||||||
{(date && parseZone(date)?.format(timeFormat)) ||
|
{parseDate(date)}
|
||||||
"No date" +
|
|
||||||
", " +
|
|
||||||
dayjs(date).toDate().toLocaleString(i18n.language, { dateStyle: "full" })}
|
|
||||||
</p>
|
</p>
|
||||||
{props.eventType.smartContractAddress && (
|
{props.eventType.smartContractAddress && (
|
||||||
<p className="px-2 py-1 mb-1 -ml-2 text-gray-500">
|
<p className="px-2 py-1 mb-1 -ml-2 text-gray-500">
|
||||||
|
|
Loading…
Reference in New Issue