Improved stability

This commit is contained in:
DomySh
2022-06-13 10:59:05 +02:00
parent cff484a976
commit b53768b5d2
16 changed files with 270 additions and 159 deletions

View File

@@ -2,7 +2,7 @@ import { Button, Group, NumberInput, Space, TextInput, Notification } from '@man
import { useForm } from '@mantine/hooks';
import React, { useState } from 'react';
import { ServiceAddForm } from '../js/models';
import { addservice } from '../js/utils';
import { addservice, okNotify } from '../js/utils';
import { ImCross } from "react-icons/im"
function AddNewService({ closePopup }:{ closePopup:()=>void }) {
@@ -27,6 +27,7 @@ function AddNewService({ closePopup }:{ closePopup:()=>void }) {
if (!res){
setSubmitLoading(false)
closePopup();
okNotify(`Service ${values.name} has been added`, `Successfully added ${values.name} with port ${values.port}`)
}else{
setSubmitLoading(false)
setError("Invalid request! [ "+res+" ]")