From 1ef255d0d18796af818b44efc2380fa1bc1e1bf5 Mon Sep 17 00:00:00 2001 From: epson220 <62466439+epson220@users.noreply.github.com> Date: Wed, 25 Nov 2020 22:39:08 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EC=95=A1=ED=8A=B8=EB=9D=BC=EC=9A=B0?= =?UTF-8?q?=ED=84=B0=EB=AC=B8=EC=A0=9C=ED=95=B4=EA=B2=B0=EC=8B=9C=EB=8F=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.eslintcache | 2 +- frontend/src/App.js | 3 +++ frontend/src/Login.js | 2 ++ frontend/src/Profile.js | 2 ++ frontend/src/Signup.js | 4 +++- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/.eslintcache b/frontend/.eslintcache index ba93ff8..ecc06de 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"},{"size":362,"mtime":1606157613272,"results":"5","hashOfConfig":"6"},{"size":689,"mtime":1606240339668,"results":"7","hashOfConfig":"6"},{"size":544,"mtime":1606240034288,"results":"8","hashOfConfig":"6"},{"size":370,"mtime":1606296711314,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"10w9ldj",{"filePath":"12","messages":"13","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\WYH\\frontend\\src\\reportWebVitals.js",[],"C:\\WYH\\frontend\\src\\App.js",["18"],"C:\\WYH\\frontend\\src\\index.js",[],"C:\\WYH\\frontend\\src\\Home.js",["19"],{"ruleId":"20","severity":1,"message":"21","line":1,"column":17,"nodeType":"22","messageId":"23","endLine":1,"endColumn":26},{"ruleId":"20","severity":1,"message":"24","line":2,"column":10,"nodeType":"22","messageId":"23","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 +[{"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":1500,"mtime":1606311498401,"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":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"26"},{"filePath":"27","messages":"28","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\WYH\\frontend\\src\\reportWebVitals.js",[],"C:\\WYH\\frontend\\src\\App.js",["31","32","33","34"],"C:\\WYH\\frontend\\src\\index.js",[],"C:\\WYH\\frontend\\src\\Home.js",["35"],"C:\\WYH\\frontend\\src\\Signup.js",["36","37"],"import React, { useState } from \"react\";\r\nimport { post } from \"../../backend/app\";\r\n\r\nconst Signup = () => {\r\n const [username, setUsername] = useState(\"\");\r\n const [nicname, setNicname] = useState(\"\");\r\n const [password, setPassword] = useState(\"\");\r\n\r\n const onChangeUsername = (e) => setUsername(e.target.value);\r\n const onChangeNicname = (e) => setNicname(e.target.value);\r\n const onChangePassword = (e) => setPassword(e.target.value);\r\n\r\n const handleFormSubmit = () => {\r\n const url = \"/signup\";\r\n const formData = new FormData();\r\n formData.append(\"username\", username);\r\n formData.append(\"password\", password);\r\n formData.append(\"nicname\", nicname);\r\n\r\n const config = {\r\n headers: {\r\n \"content-type\": \"multipart/form-data\",\r\n },\r\n };\r\n\r\n return post(url, formData, config);\r\n };\r\n\r\n return (\r\n <form onSubmit={handleFormSubmit}>\r\n <h1>회원가입</h1>\r\n 이메일:\r\n <input\r\n type=\"text\"\r\n name=\"username\"\r\n value={username}\r\n onChange={onChangeUsername}\r\n ></input>\r\n 비밀번호:\r\n <input\r\n type=\"password\"\r\n name=\"password\"\r\n value={password}\r\n onChange={onChangePassword}\r\n ></input>\r\n 닉네임:\r\n <input\r\n type=\"text\"\r\n name=\"nicname\"\r\n value={nicname}\r\n onChange={onChangeNicname}\r\n ></input>\r\n <button type=\"submit\">가입완료</button>\r\n </form>\r\n );\r\n};\r\n\r\nexport default Signup;\r\n","C:\\WYH\\frontend\\src\\Login.js",["38"],"C:\\WYH\\frontend\\src\\Profile.js",[],{"ruleId":"39","severity":1,"message":"40","line":1,"column":17,"nodeType":"41","messageId":"42","endLine":1,"endColumn":26},{"ruleId":"43","severity":2,"message":"44","line":32,"column":39,"nodeType":"41","messageId":"45","endLine":32,"endColumn":44},{"ruleId":"43","severity":2,"message":"46","line":33,"column":40,"nodeType":"41","messageId":"45","endLine":33,"endColumn":46},{"ruleId":"43","severity":2,"message":"47","line":34,"column":41,"nodeType":"41","messageId":"45","endLine":34,"endColumn":48},{"ruleId":"39","severity":1,"message":"48","line":2,"column":10,"nodeType":"41","messageId":"42","endLine":2,"endColumn":15},{"ruleId":"39","severity":1,"message":"49","line":4,"column":7,"nodeType":"41","messageId":"42","endLine":4,"endColumn":13},{"ruleId":"43","severity":2,"message":"50","line":58,"column":16,"nodeType":"41","messageId":"45","endLine":58,"endColumn":22},{"ruleId":"43","severity":2,"message":"51","line":22,"column":12,"nodeType":"41","messageId":"45","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.","'Signup' is assigned a value but never used.","'Singup' is not defined.","'post' is not defined."] \ No newline at end of file diff --git a/frontend/src/App.js b/frontend/src/App.js index 8c98350..6fb1091 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,6 +1,9 @@ import React, { Component } from "react"; import { Route } from "react-router-dom"; import Home from "./Home"; +import Login from "./Login"; +import Signup from "./Signup"; +import Profile from "./Profile"; //class App extends Component { // state = { diff --git a/frontend/src/Login.js b/frontend/src/Login.js index 249858e..cf52728 100644 --- a/frontend/src/Login.js +++ b/frontend/src/Login.js @@ -43,3 +43,5 @@ const Login = () => { </form> ); }; + +export default Login; diff --git a/frontend/src/Profile.js b/frontend/src/Profile.js index 998113d..15f0743 100644 --- a/frontend/src/Profile.js +++ b/frontend/src/Profile.js @@ -24,3 +24,5 @@ const Profile = (login_info) => { </div> ); }; + +export default Profile; diff --git a/frontend/src/Signup.js b/frontend/src/Signup.js index 0919861..4a9fbe3 100644 --- a/frontend/src/Signup.js +++ b/frontend/src/Signup.js @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { post } from "../../backend/app"; -const Singup = () => { +const Signup = () => { const [username, setUsername] = useState(""); const [nicname, setNicname] = useState(""); const [password, setPassword] = useState(""); @@ -54,3 +54,5 @@ const Singup = () => { </form> ); }; + +export default Signup; -- GitLab