Improvements on ManageServers

This commit is contained in:
Alejandro Celaya
2021-10-22 18:53:00 +02:00
parent 7f4263966e
commit 478209f50d
7 changed files with 52 additions and 26 deletions

View File

@@ -10,7 +10,7 @@ interface EditServerProps {
}
export const EditServer = (ServerError: FC) => withSelectedServer<EditServerProps>((
{ editServer, selectedServer, history: { push, goBack } },
{ editServer, selectedServer, history: { goBack } },
) => {
if (!isServerWithId(selectedServer)) {
return null;
@@ -18,7 +18,7 @@ export const EditServer = (ServerError: FC) => withSelectedServer<EditServerProp
const handleSubmit = (serverData: ServerData) => {
editServer(selectedServer.id, serverData);
push(`/server/${selectedServer.id}`);
goBack();
};
return (