Now uses GetProjects

This commit is contained in:
Peter KW 2024-03-20 12:25:59 +01:00
parent cea2b6c03c
commit 33b269e0c9

View file

@ -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<Project[]>([]);
GetProjects({ setProjectsProp: setProjects });
const content = (
<>
<h1 className="font-bold text-[30px] mb-[20px]">Manage Projects</h1>