formatting

This commit is contained in:
Michiel Crefcoeur
2024-09-16 22:20:02 +02:00
committed by GitHub
parent 2f9448dde9
commit 8f83ecb9ef
3 changed files with 12 additions and 3 deletions

View File

@@ -126,7 +126,10 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
{...field}
onChange={(e) => {
const val = e.target.value?.trim() || "";
form.setValue("appName", `${slug}-${val.toLowerCase().replaceAll(" ", "-")}`);
form.setValue(
"appName",
`${slug}-${val.toLowerCase().replaceAll(" ", "-")}`
);
field.onChange(val);
}}
/>

View File

@@ -138,7 +138,10 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
{...field}
onChange={(e) => {
const val = e.target.value?.trim() || "";
form.setValue("appName", `${slug}-${val.toLowerCase()}`);
form.setValue(
"appName",
`${slug}-${val.toLowerCase()}`
);
field.onChange(val);
}}
/>

View File

@@ -342,7 +342,10 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
{...field}
onChange={(e) => {
const val = e.target.value?.trim() || "";
form.setValue("appName", `${slug}-${val.toLowerCase()}`);
form.setValue(
"appName",
`${slug}-${val.toLowerCase()}`
);
field.onChange(val);
}}
/>