Formatting and rename param
This commit is contained in:
parent
23b3fb4346
commit
1ae95fb521
|
@ -27,11 +27,13 @@ export const alternateEventBtnStr = 'Join as Alternate';
|
||||||
export const noDescProvided = 'No description provided.';
|
export const noDescProvided = 'No description provided.';
|
||||||
|
|
||||||
// Member List generators
|
// Member List generators
|
||||||
const escapeMemberNameForDisplay = (input: string): string => input.replace(/[_*]/g, '\\$&');
|
const escapeMemberNameForDisplay = (input: memberName): string => memberName.replace(/[_*]/g, '\\$&');
|
||||||
export const generateMemberTitle = (memberList: Array<LFGMember>, maxMembers: number): string => `Members Joined: ${memberList.length}/${maxMembers}`;
|
export const generateMemberTitle = (memberList: Array<LFGMember>, maxMembers: number): string => `Members Joined: ${memberList.length}/${maxMembers}`;
|
||||||
export const generateMemberList = (memberList: Array<LFGMember>): string => memberList.length ? memberList.map((member) => `${escapeMemberNameForDisplay(member.name)} - <@${member.id}>`).join('\n') : noMembersStr;
|
export const generateMemberList = (memberList: Array<LFGMember>): string => memberList.length ? memberList.map((member) =>
|
||||||
|
`${escapeMemberNameForDisplay(member.name)} - <@${member.id}>`).join('\n') : noMembersStr;
|
||||||
export const generateAlternateList = (alternateList: Array<LFGMember>): string =>
|
export const generateAlternateList = (alternateList: Array<LFGMember>): string =>
|
||||||
alternateList.length ? alternateList.map((member) => `${escapeMemberNameForDisplay(member.name)} - <@${member.id}>${member.joined ? ' *' : ''}`).join('\n') : noMembersStr;
|
alternateList.length ? alternateList.map((member) =>
|
||||||
|
`${escapeMemberNameForDisplay(member.name)} - <@${member.id}>${member.joined ? ' *' : ''}`).join('\n') : noMembersStr;
|
||||||
|
|
||||||
// Fields for event creation and editing modals
|
// Fields for event creation and editing modals
|
||||||
export const eventTimeId = 'eventTime';
|
export const eventTimeId = 'eventTime';
|
||||||
|
|
Loading…
Reference in New Issue