Skip to content
Snippets Groups Projects
Commit fd7edbef authored by Max Ramsay King's avatar Max Ramsay King
Browse files

test

parent 58a20947
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -24,7 +24,7 @@ from MetaAugment import UCB1_JC_py as UCB1_JC ...@@ -24,7 +24,7 @@ from MetaAugment import UCB1_JC_py as UCB1_JC
bp = Blueprint("progress", __name__) bp = Blueprint("progress", __name__)
#
@bp.route("/user_input", methods=["GET", "POST"]) @bp.route("/user_input", methods=["GET", "POST"])
def response(): def response():
......
...@@ -2,17 +2,20 @@ ...@@ -2,17 +2,20 @@
"name": "react_app_metarl", "name": "react_app_metarl",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"proxy": "http://localhost:5000",
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.1.1", "@testing-library/react": "^13.1.1",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "^13.5.0",
"axios": "^0.26.1",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"react-scripts": "5.0.1", "react-scripts": "^5.0.1",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
"start-backend": "cd backend && flask run --no-debugger",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
......
import Home from './pages/Home'; import Home from './pages/Home';
import './App.css'; import './App.css';
import React, { useState, useEffect } from "react";
import axios from "axios";
function App() { function App() {
const [formData, setFormData] = useState(null)
function getData() {
axios({
method: "POST",
url:"/profile",
})
.then((response) => {
const res =response.data
setProfileData(({
profile_name: res.name,
about_me: res.about}))
}).catch((error) => {
if (error.response) {
console.log(error.response)
console.log(error.response.status)
console.log(error.response.headers)
}
})}
//end of new line
return ( return (
<div> <div>
<Home /> <Home />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment