Bug - link not showing (#2333)

* Bug - link not showing

* Added where location as link on emails

* Location URL test fixes

* URLs validator fixes

Co-authored-by: Alan <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-03-31 19:57:12 +00:00
1 parent 0494fccb8e
commit f293f8b5c4
3 files changed
+14 -2

No files matched your search

@@ -114,7 +114,7 @@ const BookingPage = ({ eventType, booking, profile }: BookingPageProps) => {
const eventTypeDetail = { isWeb3Active: false, ...eventType };
type Location = { type: LocationType; address?: string };
type Location = { type: LocationType; address?: string; link?: string };
// it would be nice if Prisma at some point in the future allowed for Json<Location>; as of now this is not the case.
const locations: Location[] = useMemo(
() => (eventType.locations as Location[]) || [],
@@ -201,6 +201,9 @@ const BookingPage = ({ eventType, booking, profile }: BookingPageProps) => {
case LocationType.InPerson: {
return locationInfo(locationType)?.address || "";
}
case LocationType.Link: {
return locationInfo(locationType)?.link || "";
}
// Catches all other location types, such as Google Meet, Zoom etc.
default:
return selectedLocation || "";