* spike: initial booking detail sheet * rename button * revert some changes * remove unnecessary test * disable booking details sheet --------- Co-authored-by: Eunjae Lee <hey@eunjae.dev> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
25 lines
721 B
TypeScript
25 lines
721 B
TypeScript
/**
|
|
* Builds a booking link with query parameters
|
|
* @param bookingUid - The unique identifier for the booking
|
|
* @param allRemainingBookings - Whether to include all remaining bookings
|
|
* @param email - Optional email of the attendee
|
|
* @returns The formatted booking link with query parameters
|
|
*/
|
|
export function buildBookingLink({
|
|
bookingUid,
|
|
allRemainingBookings,
|
|
email,
|
|
}: {
|
|
bookingUid: string;
|
|
allRemainingBookings: boolean;
|
|
email?: string | null;
|
|
}): string {
|
|
const urlSearchParams = new URLSearchParams({
|
|
allRemainingBookings: allRemainingBookings.toString(),
|
|
});
|
|
if (email) {
|
|
urlSearchParams.set("email", email);
|
|
}
|
|
return `/booking/${bookingUid}?${urlSearchParams.toString()}`;
|
|
}
|