diff --git a/frontend/.eslintcache b/frontend/.eslintcache index ba93ff8a9a86a183cb3d691e58a4e12d1549b8b2..ecc06de63e9c067dbbff5c91dd468938f14066c8 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 8c983501bb3d8f98c8236266c76321b580f7c60b..6fb10911073a2ea80a0713de40a92d42b1959f01 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 249858e67dba6759a1badc58df363e47008eb5cf..cf5272822a7443b1dfefab6e3164e92aa3fbc1db 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 998113d381a30c611d6e39a985b4094ad1e364e0..15f07432e0c22edcf3182caffd53a13a995038d0 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 0919861398fab3e9baf56395c7d1a60bed0868a5..4a9fbe34d42b3cbaafef7d6419b6f6d5ec7380d1 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;