feat: Create category component (#5103)

This commit is contained in:
Muhsin Keloth
2022-07-26 12:15:01 +05:30
committed by GitHub
parent 92bb84127b
commit bd7a56061e
7 changed files with 264 additions and 9 deletions

View File

@@ -62,9 +62,16 @@ export const createPendingMessage = data => {
return pendingMessage;
};
export const convertToSlug = text => {
export const convertToAttributeSlug = text => {
return text
.toLowerCase()
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '_');
};
export const convertToCategorySlug = text => {
return text
.toLowerCase()
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '-');
};