diff --git a/frontend/.eslintcache b/frontend/.eslintcache index 977992be6da2cea1a164e8955332412229d42998..2fee2ea6fb80ba047c11c1f371cafc4d4cedfd39 100644 --- a/frontend/.eslintcache +++ b/frontend/.eslintcache @@ -1 +1 @@ -[{"C:\\WYH\\frontend\\src\\reportWebVitals.js":"1","C:\\WYH\\frontend\\src\\App.js":"2","C:\\WYH\\frontend\\src\\index.js":"3","C:\\WYH\\frontend\\src\\Home.js":"4","C:\\WYH\\frontend\\src\\Signup.js":"5","C:\\WYH\\frontend\\src\\Login.js":"6","C:\\WYH\\frontend\\src\\Profile.js":"7"},{"size":362,"mtime":1606157613272,"results":"8","hashOfConfig":"9"},{"size":839,"mtime":1606298737123,"results":"10","hashOfConfig":"9"},{"size":544,"mtime":1606240034288,"results":"11","hashOfConfig":"9"},{"size":370,"mtime":1606296711314,"results":"12","hashOfConfig":"9"},{"size":1502,"mtime":1606311648977,"results":"13","hashOfConfig":"9"},{"size":1144,"mtime":1606311424041,"results":"14","hashOfConfig":"9"},{"size":573,"mtime":1606311449946,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"10w9ldj",{"filePath":"18","messages":"19","errorCount":3,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"26","messages":"27","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\WYH\\frontend\\src\\reportWebVitals.js",[],"C:\\WYH\\frontend\\src\\App.js",["30","31","32","33"],"C:\\WYH\\frontend\\src\\index.js",[],"C:\\WYH\\frontend\\src\\Home.js",["34"],"C:\\WYH\\frontend\\src\\Signup.js",["35"],"C:\\WYH\\frontend\\src\\Login.js",["36"],"C:\\WYH\\frontend\\src\\Profile.js",[],{"ruleId":"37","severity":1,"message":"38","line":1,"column":17,"nodeType":"39","messageId":"40","endLine":1,"endColumn":26},{"ruleId":"41","severity":2,"message":"42","line":32,"column":39,"nodeType":"39","messageId":"43","endLine":32,"endColumn":44},{"ruleId":"41","severity":2,"message":"44","line":33,"column":40,"nodeType":"39","messageId":"43","endLine":33,"endColumn":46},{"ruleId":"41","severity":2,"message":"45","line":34,"column":41,"nodeType":"39","messageId":"43","endLine":34,"endColumn":48},{"ruleId":"37","severity":1,"message":"46","line":2,"column":10,"nodeType":"39","messageId":"40","endLine":2,"endColumn":15},{"ruleId":"41","severity":2,"message":"47","line":26,"column":12,"nodeType":"39","messageId":"43","endLine":26,"endColumn":16},{"ruleId":"41","severity":2,"message":"47","line":22,"column":12,"nodeType":"39","messageId":"43","endLine":22,"endColumn":16},"no-unused-vars","'Component' is defined but never used.","Identifier","unusedVar","no-undef","'Login' is not defined.","undef","'Signup' is not defined.","'Profile' is not defined.","'Route' is defined but never used.","'post' is not defined."] \ No newline at end of file +[{"C:\\WYH\\frontend\\src\\reportWebVitals.js":"1","C:\\WYH\\frontend\\src\\App.js":"2","C:\\WYH\\frontend\\src\\index.js":"3","C:\\WYH\\frontend\\src\\Home.js":"4","C:\\WYH\\frontend\\src\\Signup.js":"5","C:\\WYH\\frontend\\src\\Login.js":"6","C:\\WYH\\frontend\\src\\Profile.js":"7"},{"size":362,"mtime":1606157613272,"results":"8","hashOfConfig":"9"},{"size":932,"mtime":1606312284464,"results":"10","hashOfConfig":"9"},{"size":544,"mtime":1606240034288,"results":"11","hashOfConfig":"9"},{"size":370,"mtime":1606296711314,"results":"12","hashOfConfig":"9"},{"size":1533,"mtime":1606312007071,"results":"13","hashOfConfig":"9"},{"size":1175,"mtime":1606312363487,"results":"14","hashOfConfig":"9"},{"size":573,"mtime":1606311449946,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"10w9ldj",{"filePath":"18","messages":"19","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\WYH\\frontend\\src\\reportWebVitals.js",[],"C:\\WYH\\frontend\\src\\App.js",["30"],"C:\\WYH\\frontend\\src\\index.js",[],"C:\\WYH\\frontend\\src\\Home.js",["31"],"C:\\WYH\\frontend\\src\\Signup.js",[],"C:\\WYH\\frontend\\src\\Login.js",[],"C:\\WYH\\frontend\\src\\Profile.js",[],{"ruleId":"32","severity":1,"message":"33","line":1,"column":17,"nodeType":"34","messageId":"35","endLine":1,"endColumn":26},{"ruleId":"32","severity":1,"message":"36","line":2,"column":10,"nodeType":"34","messageId":"35","endLine":2,"endColumn":15},"no-unused-vars","'Component' is defined but never used.","Identifier","unusedVar","'Route' is defined but never used."] \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index dc941fca4d24f08b223a5fe555083b410f6097a7..56f66b5ba3662d100b4587e14f6ba67ef5014cb0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,6 +6,7 @@ "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", + "axios": "^0.21.0", "react": "^17.0.1", "react-dom": "^17.0.1", "react-router-dom": "^5.2.0", diff --git a/frontend/src/Login.js b/frontend/src/Login.js index cf5272822a7443b1dfefab6e3164e92aa3fbc1db..1ed726b902e7821b68369385403d9a3ce9758369 100644 --- a/frontend/src/Login.js +++ b/frontend/src/Login.js @@ -1,4 +1,5 @@ import React, { useState } from "react"; +import { post } from "axios"; const Login = () => { const [username, setUsername] = useState(""); diff --git a/frontend/src/Signup.js b/frontend/src/Signup.js index 37fac441f25ed0ab694758abcc27b8568635e177..d150c92b3a7134707a345f7610796ba71dcb3170 100644 --- a/frontend/src/Signup.js +++ b/frontend/src/Signup.js @@ -1,5 +1,6 @@ import React, { useState } from "react"; //import { post } from "../../backend/app"; +import { post } from "axios"; const Signup = () => { const [username, setUsername] = useState(""); diff --git a/frontend/yarn.lock b/frontend/yarn.lock index d660e462b80a4c4110cc01030712f40d80672e9a..d4700f72789a26ff39616d06f5b5f54e9362b51b 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2467,6 +2467,13 @@ axe-core@^4.0.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.1.tgz#70a7855888e287f7add66002211a423937063eaf" integrity sha512-5Kgy8Cz6LPC9DJcNb3yjAXTu3XihQgEdnIg50c//zOC/MyLP0Clg+Y8Sh9ZjjnvBrDZU4DgXS9C3T9r4/scGZQ== +axios@^0.21.0: + version "0.21.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.0.tgz#26df088803a2350dff2c27f96fef99fe49442aca" + integrity sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw== + dependencies: + follow-redirects "^1.10.0" + axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" @@ -4997,7 +5004,7 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.0.0: +follow-redirects@^1.0.0, follow-redirects@^1.10.0: version "1.13.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==