-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #957 from mapswipe/dev
Release - 2024-July
- Loading branch information
Showing
28 changed files
with
1,775 additions
and
1,074 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// NOTE: We have a similar function in manager-dashbaord | ||
// manager-dashbaord/app/utills/common.tsx | ||
|
||
export const formatProjectTopic = (projectTopic: string) => { | ||
// Note: this will remove start and end space | ||
const projectWithoutStartAndEndSpace = projectTopic.trim(); | ||
|
||
// Note: this will change multi space to single space | ||
const removeMultiSpaceToSingle = projectWithoutStartAndEndSpace.replace(/\s+/g, ' '); | ||
const newProjectTopic = removeMultiSpaceToSingle.toLowerCase(); | ||
|
||
return newProjectTopic; | ||
}; | ||
|
||
// NOTE: this validation mirrors feature from the app on signup | ||
export const formatUserName = (name: string) => { | ||
// Note: remove all space | ||
const removeUserNameSpace = name.replace(/\s+/g, ''); | ||
const userNameLowercase = removeUserNameSpace.toLowerCase(); | ||
|
||
return userNameLowercase; | ||
}; |
Oops, something went wrong.