Skip to content

Commit

Permalink
convertToAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyjeong13 committed Jan 29, 2025
1 parent 0fe3f58 commit 41fad2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/admin/app/components/oauth-apps/CustomOAuthAppForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export function CustomOAuthAppForm({
control={form.control}
onChange={(e) => {
if (deriveIntegrationFromName) {
form.setValue("alias", convertToIntegration(e.target.value));
form.setValue("alias", convertToAlias(e.target.value));
}
}}
name="name"
Expand Down Expand Up @@ -273,6 +273,6 @@ export function CustomOAuthAppForm({
}
}

function convertToIntegration(name: string) {
function convertToAlias(name: string) {
return name.toLowerCase().replace(/[\s\W]+/g, "-");
}

0 comments on commit 41fad2e

Please sign in to comment.