diff --git a/server/client/src/components/TaskBoard/Board.js b/server/client/src/components/TaskBoard/Board.js index 79c63fe..f22c06b 100644 --- a/server/client/src/components/TaskBoard/Board.js +++ b/server/client/src/components/TaskBoard/Board.js @@ -1,17 +1,35 @@ import "../../styles/Board.css"; -import React, { Component } from "react"; +import React, { useState , useEffect } from "react"; import Activities from "./Activities"; -class Board extends Component { - render() { +const Board = () => { + // fetch here + const [response, setResponse] = useState(); + + useEffect(() => { + fetch("http://localhost:8080/api/home", { + method: 'GET', + headers: { + 'Content-Type' : 'application/json', + 'Authorization' : 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJudSIsImV4cCI6MTYwNDk3MTM1MSwiaWF0IjoxNjA0MzY2NTUxfQ.IjpsOacMSc_6FKOsJhPEcY64H_RfmppoEn7UK4fmPXGQcthA5I4LqFUr4tXBqBxkdNf8B1xMezV-sQMT_c0n7A', + } + }) + .then(resp => resp.text()) + .then(text => setResponse(text)) + .then(text => console.log(text)) + .catch(err => console.log(err)) + }, []) + + + + return (