+ {
+ games.map(game => {
+ return
+ {game.title} by {game.maker}
+ {game.number_of_players} players needed
+ Skill level is {game.skill_level}
+
+ })
+ }
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/game/GameManager.js b/src/components/game/GameManager.js
new file mode 100644
index 0000000..69fd552
--- /dev/null
+++ b/src/components/game/GameManager.js
@@ -0,0 +1,8 @@
+export const getGames = () => {
+ return fetch("http://localhost:8000/games", {
+ headers:{
+ "Authorization": `Token ${localStorage.getItem("lu_token")}`
+ }
+ })
+ .then(response => response.json())
+}
\ No newline at end of file
diff --git a/src/components/nav/NavBar.js b/src/components/nav/NavBar.js
index 0de63f0..8c4d59b 100644
--- a/src/components/nav/NavBar.js
+++ b/src/components/nav/NavBar.js
@@ -1,5 +1,5 @@
import React from "react"
-import { Link } from "react-router-dom"
+import { Link, useHistory } from "react-router-dom"
import "./NavBar.css"
export const NavBar = () => {