Hotfix for merge loss in PR2416 (#2418)
This commit is contained in:
		
							parent
							
								
									a551919152
								
							
						
					
					
						commit
						e6587efd27
					
				
					 1 changed files with 3 additions and 7 deletions
				
			
		|  | @ -126,10 +126,7 @@ export const getGroupName = (usernameList: string[]): string => { | |||
| export const getUsernameSlugLink = ({ users, slug }: UsernameSlugLinkProps): string => { | ||||
|   let slugLink = ``; | ||||
|   if (users.length > 1) { | ||||
|     let combinedUsername = `${users[0].username}`; | ||||
|     for (let i = 1; i < users.length; i++) { | ||||
|       combinedUsername = `${combinedUsername}+${users[i].username}`;
 | ||||
|     } | ||||
|     const combinedUsername = users.map((user) => user.username).join("+"); | ||||
|     slugLink = `/${combinedUsername}/${slug}`; | ||||
|   } else { | ||||
|     slugLink = `/${users[0].username}/${slug}`; | ||||
|  | @ -138,11 +135,10 @@ export const getUsernameSlugLink = ({ users, slug }: UsernameSlugLinkProps): str | |||
| }; | ||||
| 
 | ||||
| export const getUsernameList = (users: string): string[] => { | ||||
|   // For Team booking, users might be undefined
 | ||||
|   return users | ||||
|     ?.toLowerCase() | ||||
|     .replace(" ", "+") | ||||
|     .replace("%20", "+") | ||||
|     .replace(/ /g, "+") | ||||
|     .replace(/%20/g, "+") | ||||
|     .split("+") | ||||
|     .filter((el) => { | ||||
|       return el.length != 0; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Syed Ali Shahbaz
						Syed Ali Shahbaz