diff --git a/wip-app/src/pages/ProjectPage/ProjectPage.js b/wip-app/src/pages/ProjectPage/ProjectPage.js index 572f75f..80e4f88 100644 --- a/wip-app/src/pages/ProjectPage/ProjectPage.js +++ b/wip-app/src/pages/ProjectPage/ProjectPage.js @@ -1,22 +1,48 @@ import React from "react"; -// import { projectPage } from "../../utils/get-fetch"; +import { getProjectPage } from "../../utils/get-fetch"; const ProjectPage = () => { - // const [projectData, setProjectData] = React.useState([]); + const [projectData, setProjectData] = React.useState([]); + const [stepId, setStepId] = React.useState(null); + const [feedbackObject, setFeedbackObject] = React.useState([]); + + const projectId = 3; + + React.useEffect(() => { + getProjectPage(projectId).then((projectData) => { + setProjectData(projectData); + console.log(projectData); + setStepId(projectData.id); + }); + }, []); // React.useEffect(() => { - // projectPage().then(setProjectData); - // }, []); + // getFeedback().then(setFeedbackObject) + // }, [stepId]) - // const { - // id, - // user_id, - // project_name, - // project_description, - // project_status, - // } = projectData; + const { + id, + username, + step_link, + step_name, + project_name, + project_description, + project_status, + } = projectData; - return
Project status: {project_status ? "Finished" : "In Progress"}
+{project_description}
+