2021-10-05 22:53:24 +00:00
|
|
|
export function getEventName(
|
|
|
|
name: string | string[] | undefined,
|
|
|
|
eventTitle: string,
|
|
|
|
eventNameTemplate: string | null
|
|
|
|
) {
|
|
|
|
if (!name || !(typeof name === "string")) name = ""; // If name is not set or is not of proper type
|
2021-08-19 12:27:01 +00:00
|
|
|
return eventNameTemplate ? eventNameTemplate.replace("{USER}", name) : eventTitle + " with " + name;
|
2021-06-15 15:26:16 +00:00
|
|
|
}
|