Redirect on people list after people creation

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-03-17 10:05:35 +01:00
parent 93a3ab1517
commit 7a4ea49cb3

View File

@@ -112,15 +112,13 @@ function CreatePeoplePageContent() {
kind: formData.kind, kind: formData.kind,
}, },
}, },
onCompleted: (response) => { onCompleted: () => {
toast({ toast({
title: "Success", title: "Success",
description: "Person created successfully", description: "Person created successfully",
variant: "default", variant: "default",
}); });
navigate( navigate(`/organizations/${organizationId}/people`);
`/organizations/${organizationId}/people/${response.createPeople.peopleEdge.node.id}`
);
}, },
onError: (error) => { onError: (error) => {
toast({ toast({