fix(projects): sélectionner automatiquement le nouveau projet
This commit is contained in:
parent
55b30df823
commit
761f6f42a5
1 changed files with 5 additions and 3 deletions
|
|
@ -44,11 +44,13 @@ export default function ProjectForm() {
|
|||
try {
|
||||
if (isEditing && projectId) {
|
||||
await updateProject(projectId, name, baseBranch);
|
||||
window.dispatchEvent(new Event("orchai:refresh-projects"));
|
||||
navigate("/");
|
||||
} else {
|
||||
await createProject(name, pathOrUrl, baseBranch);
|
||||
const project = await createProject(name, pathOrUrl, baseBranch);
|
||||
window.dispatchEvent(new Event("orchai:refresh-projects"));
|
||||
navigate(`/projects/${project.id}`);
|
||||
}
|
||||
window.dispatchEvent(new Event("orchai:refresh-projects"));
|
||||
navigate("/");
|
||||
} catch (err: unknown) {
|
||||
setError(getErrorMessage(err));
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in a new issue