feat: add repo field to Project
This commit is contained in:
@@ -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 || [],
|
||||
|
||||
Reference in New Issue
Block a user