diff --git a/.DS_Store b/.DS_Store index 9c56af02f8daf430ac5ba6c34ecf7d4eaf8bd0bc..026dff4c27667cdd47dbcd38cf0ea8fef90ab673 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/backend/auto_augmentation/progress.py b/backend/auto_augmentation/progress.py index bef9dc78ccca66e09177fab8ad744bfd81833a8f..25610485b54fdcec657508c029ddc06a48cf321c 100644 --- a/backend/auto_augmentation/progress.py +++ b/backend/auto_augmentation/progress.py @@ -24,7 +24,7 @@ from MetaAugment import UCB1_JC_py as UCB1_JC bp = Blueprint("progress", __name__) - +# @bp.route("/user_input", methods=["GET", "POST"]) def response(): diff --git a/package.json b/package.json index 5344c59cea71aebb3cc2bd5cb02b0a930d019cbf..8fbf76ae7a348935f29d0362646e77b64388f10b 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,20 @@ "name": "react_app_metarl", "version": "0.1.0", "private": true, + "proxy": "http://localhost:5000", "dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^13.5.0", + "axios": "^0.26.1", "react": "^18.0.0", "react-dom": "^18.0.0", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", + "start-backend": "cd backend && flask run --no-debugger", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/src/App.js b/src/App.js index c38c280f479656ad0f7d38bcfe716e86acd00cf1..2f0f2885c04369ca8672d82586d4ea479e884d5c 100644 --- a/src/App.js +++ b/src/App.js @@ -1,7 +1,30 @@ import Home from './pages/Home'; import './App.css'; +import React, { useState, useEffect } from "react"; +import axios from "axios"; 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 ( <div> <Home />