mike dupont commited on
Commit
5874113
·
1 Parent(s): a38eec0

working in docker

Browse files
frontend/package-lock.json CHANGED
@@ -13,10 +13,13 @@
13
  "@testing-library/jest-dom": "^5.17.0",
14
  "@testing-library/react": "^13.4.0",
15
  "@testing-library/user-event": "^13.5.0",
 
16
  "axios": "^1.7.7",
 
17
  "react": "^18.3.1",
18
  "react-dom": "^18.3.1",
19
  "react-scripts": "^5.0.1",
 
20
  "web-vitals": "^2.1.4"
21
  }
22
  },
 
13
  "@testing-library/jest-dom": "^5.17.0",
14
  "@testing-library/react": "^13.4.0",
15
  "@testing-library/user-event": "^13.5.0",
16
+ "autoprefixer": "^10.4.20",
17
  "axios": "^1.7.7",
18
+ "postcss": "^8.4.47",
19
  "react": "^18.3.1",
20
  "react-dom": "^18.3.1",
21
  "react-scripts": "^5.0.1",
22
+ "tailwindcss": "^3.4.13",
23
  "web-vitals": "^2.1.4"
24
  }
25
  },
frontend/package.json CHANGED
@@ -8,10 +8,13 @@
8
  "@testing-library/jest-dom": "^5.17.0",
9
  "@testing-library/react": "^13.4.0",
10
  "@testing-library/user-event": "^13.5.0",
 
11
  "axios": "^1.7.7",
 
12
  "react": "^18.3.1",
13
  "react-dom": "^18.3.1",
14
  "react-scripts": "^5.0.1",
 
15
  "web-vitals": "^2.1.4"
16
  },
17
  "scripts": {
 
8
  "@testing-library/jest-dom": "^5.17.0",
9
  "@testing-library/react": "^13.4.0",
10
  "@testing-library/user-event": "^13.5.0",
11
+ "autoprefixer": "^10.4.20",
12
  "axios": "^1.7.7",
13
+ "postcss": "^8.4.47",
14
  "react": "^18.3.1",
15
  "react-dom": "^18.3.1",
16
  "react-scripts": "^5.0.1",
17
+ "tailwindcss": "^3.4.13",
18
  "web-vitals": "^2.1.4"
19
  },
20
  "scripts": {
frontend/src/App.js CHANGED
@@ -14,20 +14,24 @@ import {
14
 
15
  function App() {
16
 
17
- const [statements, setStatements] = useState([]);
18
-
19
- // function to fetch all statements from BE
20
- useEffect(() => {
21
- axios
22
- .get("http://localhost:7860/data")
23
- .then((response) => {
24
- setStatements(response.data);
25
- })
26
- .catch((error) => {
27
- console.log("There was an error retrieving the statement list: ", error);
28
- });
29
- }, []);
30
-
 
 
 
 
31
  return (
32
  <div className="App">
33
  <header className="App-header">
 
14
 
15
  function App() {
16
 
17
+ const [statements, setStatements] = useState([
18
+ "Empty statements"
19
+ ]);
20
+
21
+ // function to fetch all statements from BE
22
+ useEffect(() => {
23
+ axios
24
+ .get("/data")
25
+ .then((response) => {
26
+ console.log("Got data ", response.data);
27
+ setStatements(JSON.stringify(response.data));
28
+ })
29
+ .catch((error) => {
30
+ console.log("There was an error retrieving the statement list: ", error);
31
+ setStatements(JSON.stringify(error));
32
+ });
33
+ }, []);
34
+
35
  return (
36
  <div className="App">
37
  <header className="App-header">