diff --git a/components/Layout/Layout.tsx b/components/Layout/Layout.tsx index bc66007..e10f680 100644 --- a/components/Layout/Layout.tsx +++ b/components/Layout/Layout.tsx @@ -13,9 +13,9 @@ export default function Layout({ children }) { IsaCon -
+
-
{children}
+
{children}
diff --git a/components/Navbar/Navbar.tsx b/components/Navbar/Navbar.tsx index 636272c..fcc180c 100644 --- a/components/Navbar/Navbar.tsx +++ b/components/Navbar/Navbar.tsx @@ -1,6 +1,8 @@ +import Link from "next/link" + export default function Navbar() { return ( -
diff --git a/pages/projects.tsx b/pages/projects.tsx new file mode 100644 index 0000000..5dacea1 --- /dev/null +++ b/pages/projects.tsx @@ -0,0 +1,34 @@ +export async function getServerSideProps({ res }) { + res.setHeader("Cache-Control", "public, s-maxage=10, stale-while-revalidate=59") + const eventsResponse = await fetch("http://localhost:3000/api/events", { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + }) + const allEvents = await eventsResponse.json() + + return { + props: { allEvents }, + } +} + +export default function Dashboard({ allEvents }) { + return ( + <> +
+
+
+

+ IsaCon +

+

Events

+ {allEvents.data.map((event) => ( +
{event.name}
+ ))} +
+
+
+ + ) +} diff --git a/pages/team.tsx b/pages/team.tsx new file mode 100644 index 0000000..dd48b5e --- /dev/null +++ b/pages/team.tsx @@ -0,0 +1,34 @@ +export async function getServerSideProps({ res }) { + res.setHeader("Cache-Control", "public, s-maxage=10, stale-while-revalidate=59") + const playersResponse = await fetch("http://localhost:3000/api/players", { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + }) + const allPlayers = await playersResponse.json() + + return { + props: { allPlayers }, + } +} + +export default function Dashboard({ allPlayers }) { + return ( + <> +
+
+
+

+ IsaCon +

+

Players

+ {allPlayers.data.map((player) => ( +
{player.name}
+ ))} +
+
+
+ + ) +}