1 parent
832fce91e0
commit
9093909075
2 files changed
+8
-3
No files matched your search
@@ -240,7 +240,7 @@ export default function Success(props: SuccessProps) {
|
||||
const giphyAppData = getEventTypeAppData(eventType, "giphy");
|
||||
const giphyImage = giphyAppData?.thankYouPage;
|
||||
|
||||
const eventName = getEventName(eventNameObject);
|
||||
const eventName = getEventName(eventNameObject, true);
|
||||
const needsConfirmation = eventType.requiresConfirmation && reschedule != true;
|
||||
const isCancelled = status === "CANCELLED" || status === "REJECTED";
|
||||
const telemetry = useTelemetry();
|
||||
|
||||
@@ -11,7 +11,7 @@ export type EventNameObjectType = {
|
||||
t: TFunction;
|
||||
};
|
||||
|
||||
export function getEventName(eventNameObj: EventNameObjectType) {
|
||||
export function getEventName(eventNameObj: EventNameObjectType, forAttendeeView = false) {
|
||||
if (!eventNameObj.eventName)
|
||||
return eventNameObj.t("event_between_users", {
|
||||
eventName: eventNameObj.eventType,
|
||||
@@ -22,12 +22,13 @@ export function getEventName(eventNameObj: EventNameObjectType) {
|
||||
let eventName = eventNameObj.eventName;
|
||||
let locationString = eventNameObj.location || "";
|
||||
|
||||
if (eventNameObj.eventName.includes("{Location}")) {
|
||||
if (eventNameObj.eventName.includes("{Location}") || eventNameObj.eventName.includes("{LOCATION}")) {
|
||||
const eventLocationType = guessEventLocationType(eventNameObj.location);
|
||||
if (eventLocationType) {
|
||||
locationString = eventLocationType.label;
|
||||
}
|
||||
eventName = eventName.replace("{Location}", locationString);
|
||||
eventName = eventName.replace("{LOCATION}", locationString);
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -36,5 +37,9 @@ export function getEventName(eventNameObj: EventNameObjectType) {
|
||||
.replace("{Event type title}", eventNameObj.eventType)
|
||||
.replace("{Scheduler}", eventNameObj.attendeeName)
|
||||
.replace("{Organiser}", eventNameObj.host)
|
||||
.replace("{USER}", eventNameObj.attendeeName)
|
||||
.replace("{ATTENDEE}", eventNameObj.attendeeName)
|
||||
.replace("{HOST}", eventNameObj.host)
|
||||
.replace("{HOST/ATTENDEE}", forAttendeeView ? eventNameObj.host : eventNameObj.attendeeName)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user