feat: add repo field to Project

This commit is contained in:
Zhi
2026-03-12 12:06:46 +00:00
parent 529ceafde4
commit 98ba64e35c
3 changed files with 10 additions and 3 deletions

View File

@@ -19,13 +19,14 @@ export default function ProjectDetailPage() {
const [users, setUsers] = useState<any[]>([])
const [roles, setRoles] = useState<any[]>([])
const [editing, setEditing] = useState(false)
const [editForm, setEditForm] = useState({ owner: '', description: '', sub_projects: [] as string[], related_projects: [] as string[] })
const [editForm, setEditForm] = useState({ owner: '', repo: '', description: '', sub_projects: [] as string[], related_projects: [] as string[] })
useEffect(() => {
api.get<Project>(`/projects/${id}`).then(({ data }) => {
setProject(data)
setEditForm({
owner: data.owner || '',
repo: data.repo || '',
description: data.description || '',
sub_projects: data.sub_projects || [],
related_projects: data.related_projects || [],