From fd7edbef3ac85e684b467f6874577d11a6554458 Mon Sep 17 00:00:00 2001 From: Max Ramsay King <maxramsayking@gmail.com> Date: Sat, 16 Apr 2022 12:03:23 -0700 Subject: [PATCH] test --- .DS_Store | Bin 6148 -> 6148 bytes backend/auto_augmentation/progress.py | 2 +- package.json | 5 ++++- src/App.js | 23 +++++++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index 9c56af02f8daf430ac5ba6c34ecf7d4eaf8bd0bc..026dff4c27667cdd47dbcd38cf0ea8fef90ab673 100644 GIT binary patch delta 476 zcmZoMXfc@J&nU7nU^g?P$YvfEZN_>Qh7^W;hGd4~oOHwB<ow(M1~3pf$-uw>m&?s} zaY@R_PhwzT;9y{AxW0|~h$E_e3SRkw3}mwdKsInNWHRJ26xTD9FeEbMF(fmjqB;Pi zh5@Pwp$5$%i^4A+1~~+aIur-tR98@s;xe$M+zh@9sbDJ|8A=(_8FCp?8S)rPkew%f yxpX!I0|O3~sE%aVE5QN|Ev%~T8A@{Vk==@4IYS9@P>Nq`*qA87xS5^fFFydtiD_&A delta 284 zcmZoMXfc@J&&ahgU^g=(*Jd6TZN_?bh9rhWhGd3phE#?;hLoi8;)0}{{3HejhHXg& zIhn;J1_sv{nV4Bv+1NSQIk-7ugER8WgG&-iN{gKmi=siiko^3dBp5p}DJ(O!JYGP= zIX|x?F*7f<2&5!9GbJ@Cu_z`yGcP5-+$p~_FQpi)w;n3P!O6iHFCbQ3ZJ?uIVq#jW zqfl*WWT2y9YG71b%gG_CtZy9@pPiGNm*2qv28@hgih+R_O2ep51_lN+Pn881<>ln( Wr86)vz;wY>Z!EaPxS5^fFFydXQ%8UR diff --git a/backend/auto_augmentation/progress.py b/backend/auto_augmentation/progress.py index bef9dc78..25610485 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 5344c59c..8fbf76ae 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 c38c280f..2f0f2885 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 /> -- GitLab