fix:新建项目更新项目选项

This commit is contained in:
xiaozhu
2026-08-11 18:53:11 +08:00
parent c63f745374
commit 064403ad70
2 changed files with 22 additions and 2 deletions
@@ -20,7 +20,7 @@ export function ProjectManagementPage({
onConnectionChange: (online: boolean) => void;
}) {
const api = useApi();
const { user } = useAuth();
const { user, refreshWorkspaces } = useAuth();
const [projects, setProjects] = useState<Workspace[]>([]);
const [projectLoading, setProjectLoading] = useState(true);
const [projectDialogOpen, setProjectDialogOpen] = useState(false);
@@ -107,6 +107,7 @@ export function ProjectManagementPage({
description: projectForm.description.trim() || undefined,
});
setProjects((current) => [...current, created]);
void refreshWorkspaces();
onNotify({ tone: "success", message: "项目已创建" });
}
setProjectDialogOpen(false);