From 33b269e0c987faacfe8e487c516ae772cb880736 Mon Sep 17 00:00:00 2001 From: Peter KW Date: Wed, 20 Mar 2024 12:25:59 +0100 Subject: [PATCH] Now uses GetProjects --- frontend/src/Pages/AdminPages/AdminManageProjects.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/Pages/AdminPages/AdminManageProjects.tsx b/frontend/src/Pages/AdminPages/AdminManageProjects.tsx index 14e44be..7ea45df 100644 --- a/frontend/src/Pages/AdminPages/AdminManageProjects.tsx +++ b/frontend/src/Pages/AdminPages/AdminManageProjects.tsx @@ -3,11 +3,13 @@ import BackButton from "../../Components/BackButton"; import BasicWindow from "../../Components/BasicWindow"; import Button from "../../Components/Button"; import { ProjectListAdmin } from "../../Components/ProjectListAdmin"; -import { NewProject } from "../../Types/goTypes"; +import { Project } from "../../Types/goTypes"; +import GetProjects from "../../Components/GetProjects"; +import { useState } from "react"; function AdminManageProjects(): JSX.Element { - //TODO: Use fetch to get all projects - const projects: NewProject[] = [{ name: "Project", description: "New" }]; + const [projects, setProjects] = useState([]); + GetProjects({ setProjectsProp: setProjects }); const content = ( <>

Manage Projects