diff --git a/src/Home.tsx b/src/Home.tsx
index 7d848c4..37d87a2 100644
--- a/src/Home.tsx
+++ b/src/Home.tsx
@@ -1,29 +1,40 @@
import { useState } from "react";
import { Button } from "@/components/ui/button";
+function Issue({ issue }: { issue: any }) {
+ return (
+
+ [{issue.id}] {issue.title}
+
+ );
+}
+
function Home() {
const [issues, setIssues] = useState([]);
const [serverURL, setServerURL] = useState("http://localhost:3000");
async function getIssues() {
const res = await fetch(`${serverURL}/issues/all`);
+ const data = await res.json();
+ setIssues(data);
}
return (
Issue Project Manager
-
- Issues count: {issues.length}
{issues.length > 0 && (
-
+ <>
{issues.map((issue: any) => (
- - {issue.title}
+
))}
-
+
+ {JSON.stringify(issues, null, 2)}
+
+ >
)}
);