Apply Prettier formatting
This commit is contained in:
parent
3b505bc3a6
commit
f8f0212ac9
1 changed files with 4 additions and 5 deletions
|
|
@ -23,16 +23,15 @@ export default function FlowSettingsModal({
|
||||||
|
|
||||||
const [name, setName] = useState(currentFlow!.name);
|
const [name, setName] = useState(currentFlow!.name);
|
||||||
const [description, setDescription] = useState(currentFlow!.description);
|
const [description, setDescription] = useState(currentFlow!.description);
|
||||||
const [endpoint_name, setEndpointName] = useState(
|
const [endpoint_name, setEndpointName] = useState(currentFlow!.endpoint_name);
|
||||||
currentFlow!.endpoint_name
|
|
||||||
);
|
|
||||||
const [isSaving, setIsSaving] = useState(false);
|
const [isSaving, setIsSaving] = useState(false);
|
||||||
const [disableSave, setDisableSave] = useState(true);
|
const [disableSave, setDisableSave] = useState(true);
|
||||||
function handleClick(): void {
|
function handleClick(): void {
|
||||||
setIsSaving(true);
|
setIsSaving(true);
|
||||||
currentFlow!.name = name;
|
currentFlow!.name = name;
|
||||||
currentFlow!.description = description;
|
currentFlow!.description = description;
|
||||||
currentFlow!.endpoint_name = (endpoint_name && endpoint_name.length > 0) ? endpoint_name : undefined;
|
currentFlow!.endpoint_name =
|
||||||
|
endpoint_name && endpoint_name.length > 0 ? endpoint_name : undefined;
|
||||||
saveFlow(currentFlow!)
|
saveFlow(currentFlow!)
|
||||||
?.then(() => {
|
?.then(() => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
|
|
@ -64,7 +63,7 @@ export default function FlowSettingsModal({
|
||||||
(!nameLists.includes(name) && currentFlow?.name !== name) ||
|
(!nameLists.includes(name) && currentFlow?.name !== name) ||
|
||||||
currentFlow?.description !== description ||
|
currentFlow?.description !== description ||
|
||||||
((currentFlow?.endpoint_name ?? "" !== endpoint_name) &&
|
((currentFlow?.endpoint_name ?? "" !== endpoint_name) &&
|
||||||
isEndpointNameValid(endpoint_name??"", 50))
|
isEndpointNameValid(endpoint_name ?? "", 50))
|
||||||
) {
|
) {
|
||||||
setDisableSave(false);
|
setDisableSave(false);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue