diff --git a/client/.eslintcache b/client/.eslintcache index 59969ea2134f7298c89ccd05abc492f325f85d3c..65c972631cf71428aba7c0de4d3136429b5a15dd 100644 --- a/client/.eslintcache +++ b/client/.eslintcache @@ -1 +1 @@ -[{"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\index.js":"1","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\App.js":"2","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\reportWebVitals.js":"3","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Home.js":"4","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Login.js":"5","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Signup.js":"6","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Menu.js":"7","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Header.js":"8","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Info.js":"9","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Join.js":"10","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Match.js":"11","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\JList.js":"12","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\MList.js":"13","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\request.js":"14","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\InList.js":"15"},{"size":500,"mtime":499162500000,"results":"16","hashOfConfig":"17"},{"size":986,"mtime":1607731725247,"results":"18","hashOfConfig":"17"},{"size":362,"mtime":499162500000,"results":"19","hashOfConfig":"17"},{"size":306,"mtime":1607357448211,"results":"20","hashOfConfig":"17"},{"size":3498,"mtime":1607801466370,"results":"21","hashOfConfig":"17"},{"size":5315,"mtime":1607801870907,"results":"22","hashOfConfig":"17"},{"size":1049,"mtime":1607402199570,"results":"23","hashOfConfig":"17"},{"size":2996,"mtime":1607768749803,"results":"24","hashOfConfig":"17"},{"size":3511,"mtime":1607799946840,"results":"25","hashOfConfig":"17"},{"size":3294,"mtime":1607795949257,"results":"26","hashOfConfig":"17"},{"size":3275,"mtime":1607796749429,"results":"27","hashOfConfig":"17"},{"size":3637,"mtime":1607796915927,"results":"28","hashOfConfig":"17"},{"size":3621,"mtime":1607796975146,"results":"29","hashOfConfig":"17"},{"size":2305,"mtime":1607728004747,"results":"30","hashOfConfig":"17"},{"size":3482,"mtime":1607799948779,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"acqgsi",{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"43","usedDeprecatedRules":"34"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"52","usedDeprecatedRules":"34"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"55","usedDeprecatedRules":"34"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"60","usedDeprecatedRules":"34"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"63","usedDeprecatedRules":"34"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"66","usedDeprecatedRules":"34"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\index.js",[],["69","70"],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\App.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\reportWebVitals.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Home.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Login.js",["71"],"import React from 'react'\r\nimport request from '../request'\r\nimport { withRouter } from 'react-router-dom';\r\n\r\nclass Login extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n email: \"\",\r\n password: \"\"\r\n }\r\n }\r\n email_value = (e) => {\r\n this.setState ({\r\n email: e.target.value\r\n });\r\n }\r\n pw_value = (e) => {\r\n this.setState({\r\n password: e.target.value\r\n });\r\n }\r\n handleSubmit= event => {\r\n event.preventDefault();\r\n \r\n const data = ({\r\n email: this.state.email,\r\n password: this.state.password\r\n })\r\n request.checkUser(data).then(result => {\r\n console.log(result);\r\n if(result.result == \"fail\") {\r\n alert(\"Wrong Input\");\r\n this.props.history.push('/login');\r\n }\r\n else {\r\n this.setState({\r\n email: result.email,\r\n password: result.password\r\n });\r\n sessionStorage.setItem(\"is_authen\", true);\r\n sessionStorage.setItem(\"username\", result.username);\r\n this.props.getName();\r\n this.props.history.push('/menu');\r\n }\r\n })\r\n \r\n }\r\n render() {\r\n return(\r\n <div id=\"container\" className=\"main_container\">\r\n <div className=\"login_container\">\r\n <form className=\"form_container\">\r\n <div className=\"form_container\">\r\n <div className=\"form_title_div\">\r\n <p className=\"form_title_p\">Member Login</p>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">email</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" placeholder=\"email\" className=\"form_input\" onChange={this.email_value}></input>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">Password</p>\r\n </div>\r\n <div>\r\n <input type=\"password\" placeholder=\"Enter password\" className=\"form_input\" onChange={this.pw_value}></input>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_password\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <input type=\"submit\" className=\"form_submit_button\" value=\"Submit\" onClick={this.handleSubmit.bind(this)}></input>\r\n </div>\r\n </div>\r\n </form> \r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nexport default withRouter(Login)","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Signup.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Menu.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Header.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Info.js",["72","73","74","75","76"],"import React from 'react'\r\nimport InList from './InList'\r\nimport request from '../request'\r\nimport { BrowserRouter, withRouter, Switch, Route, Link } from 'react-router-dom'\r\n\r\nclass Info extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n click: false,\r\n update: false,\r\n location: \"\",\r\n Lists: []\r\n }\r\n this.returnsearch = this.returnsearch.bind(this)\r\n }\r\n detect = event => {\r\n this.setState({\r\n location: event.target.value\r\n })\r\n }\r\n showList = event => {\r\n event.preventDefault();\r\n request.getInfoList().then().then(datas => {\r\n if(datas.length > 0) {\r\n const result = datas.filter(data => data.location === this.state.location)\r\n this.setState({\r\n Lists: result,\r\n click: true\r\n })\r\n }\r\n });\r\n }\r\n goBack = event => {\r\n event.preventDefault();\r\n this.setState({\r\n click: false\r\n })\r\n }\r\n returnsearch() {\r\n this.setState({\r\n update: false\r\n });\r\n }\r\n onUpate = event => {\r\n event.preventDefault();\r\n this.setState({\r\n update: true\r\n })\r\n }\r\n render() {\r\n if(this.state.update === true) {\r\n return(\r\n <InList return={this.returnsearch}></InList>\r\n )\r\n }\r\n if(this.state.click === false) {\r\n return(\r\n <div className=\"form_container\">\r\n <div className=\"searchLocation\">\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n <div>\r\n <p className=\"form_item_name\">search</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" className=\"form_input\" onChange={this.detect}></input>\r\n </div>\r\n \r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n <button type=\"button\" onClick={this.showList} className=\"form_submit_button\">Search</button>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n <button type=\"button\" className=\"form_submit_button\" onClick={this.onUpate.bind(this)}>New</button>\r\n \r\n </div>\r\n </div>\r\n )\r\n } else {\r\n const filter_list = [];\r\n this.state.Lists.map(list => {\r\n filter_list.push(<li>{list.time} {list.name}</li>)\r\n })\r\n return(\r\n <div className=\"form_container\">\r\n <p>경기장 리스트</p>\r\n <ul>\r\n {filter_list}\r\n </ul> \r\n <button type=\"button\" className=\"form_submit_button\" onClick={this.goBack}>Back</button>\r\n </div> \r\n )\r\n }\r\n }\r\n}\r\n\r\nexport default withRouter(Info)","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Join.js",["77"],"import React from 'react'\r\nimport JList from './JList'\r\nimport request from '../request'\r\nimport { withRouter, Redirect } from \"react-router-dom\";\r\n\r\nclass Join extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { \r\n click: false,\r\n check: false,\r\n title: \"\",\r\n description: \"\",\r\n }\r\n this.Submit = this.Submit.bind(this);\r\n }\r\n Makefile = e => {\r\n this.setState({\r\n click: true\r\n });\r\n }\r\n Goback = e => {\r\n this.setState({\r\n click: false\r\n });\r\n }\r\n handleTitle = e => {\r\n this.setState({\r\n title: e.target.value\r\n })\r\n }\r\n handleDes = e => {\r\n this.setState({\r\n description: e.target.value\r\n })\r\n }\r\n Submit = event => {\r\n event.preventDefault();\r\n this.Goback();\r\n \r\n const data = ({\r\n title: this.state.title,\r\n description: this.state.description\r\n });\r\n \r\n request.joinList(data).then(result => {\r\n this.props.history.push('/join');\r\n }); \r\n }\r\n render() {\r\n if(this.state.click === false){\r\n return(\r\n <div className=\"Group\">\r\n <button type=\"button\" onClick={this.Makefile} className=\"Groupbut\">new</button>\r\n <JList></JList>\r\n </div>\r\n )\r\n } else {\r\n return (\r\n <div>\r\n <div className=\"form_container\">\r\n \r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">title</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" onChange={this.handleTitle} className=\"form_input\" placeholder=\"Input Title\" ></input>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">description</p>\r\n </div>\r\n <div>\r\n <textarea className=\"form_input\" cols='10' rows='10'placeholder=\"Input Description\" onChange={this.handleDes}></textarea>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <button type=\"button\" onClick={this.Submit} className=\"form_submit_button\">save</button>\r\n <button type=\"button\" onClick={this.Goback} className=\"form_cancel_button\">back</button>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n }\r\n }\r\n}\r\n\r\nexport default withRouter(Join)","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\Match.js",[],"C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\JList.js",["78","79","80"],"import React from 'react'\r\nimport request from '../request'\r\nimport { withRouter, Redirect } from 'react-router-dom'\r\n\r\nclass JList extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n Lists: [],\r\n click: false,\r\n content : \"\",\r\n title: \"\"\r\n }\r\n }\r\n showDes = e => {\r\n this.setState({\r\n click: true\r\n })\r\n this.state.Lists.map(list => {\r\n if(list.title === e.target.innerText) {\r\n this.setState({\r\n content: list.description,\r\n title: list.title\r\n })\r\n }\r\n })\r\n }\r\n Goback = e => {\r\n this.setState({\r\n click: false\r\n });\r\n this.props.history.push('/join');\r\n }\r\n shouldComponentUpdate() {\r\n return true;\r\n }\r\n componentDidMount() { \r\n request.getJoinList().then().then(data => {\r\n this.setState({\r\n Lists: data\r\n })\r\n });\r\n }\r\n render() {\r\n const format = [];\r\n const number = []\r\n if(this.state.Lists.length > 0){\r\n this.state.Lists.map(list => {\r\n number.push(1);\r\n format.push(<tr></tr>)\r\n format.push(<td>{number.length}</td>)\r\n format.push(<td onClick={this.showDes}>{list.title}</td>)\r\n });\r\n }\r\n \r\n if(this.state.click === true) {\r\n return(\r\n <div>\r\n <div className=\"form_container\">\r\n <div className=\"form_title_div\">\r\n <p className=\"form_title_p\">게시물</p>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">title</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" className=\"form_input\" value={this.state.title}/>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">Content</p>\r\n </div>\r\n <div>\r\n <textarea className=\"form_input\" value={this.state.content}/>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_password\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <button type=\"button\" className=\"form_submit_button\" onClick={this.Goback}>Back</button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n ) \r\n } else {\r\n return(\r\n <div className=\"showList\">\r\n <table>\r\n <tr>\r\n <th>Index</th>\r\n <th>Title</th>\r\n </tr>\r\n {format}\r\n </table>\r\n </div> \r\n ) \r\n } \r\n }\r\n}\r\n\r\nexport default withRouter(JList)","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\MList.js",["81","82"],"import React from 'react'\r\nimport request from '../request'\r\nimport { withRouter } from 'react-router-dom'\r\n\r\nclass MList extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n Lists: [],\r\n click: false,\r\n content : \"\",\r\n title: \"\"\r\n }\r\n }\r\n showDes = e => {\r\n this.setState({\r\n click: true\r\n })\r\n this.state.Lists.map(list => {\r\n if(list.title === e.target.innerText) {\r\n this.setState({\r\n content: list.description,\r\n title: list.title\r\n })\r\n }\r\n })\r\n }\r\n Goback = e => {\r\n this.setState({\r\n click: false\r\n });\r\n this.props.history.push('/match');\r\n }\r\n shouldComponentUpdate() {\r\n return true \r\n }\r\n componentDidMount() { \r\n request.getMatchList().then().then(data => {\r\n this.setState({\r\n Lists: data\r\n })\r\n });\r\n }\r\n render() {\r\n const format = [];\r\n const number = []\r\n if(this.state.Lists.length > 0) {\r\n this.state.Lists.map(list => {\r\n number.push(1);\r\n format.push(<tr></tr>)\r\n format.push(<td>{number.length}</td>)\r\n format.push(<td onClick={this.showDes}>{list.title}</td>)\r\n });\r\n }\r\n if(this.state.click === true) {\r\n return(\r\n <div>\r\n <div className=\"form_container\">\r\n <div className=\"form_title_div\">\r\n <p className=\"form_title_p\">게시물</p>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">title</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" className=\"form_input\" value={this.state.title}/>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">Content</p>\r\n </div>\r\n <div>\r\n <textarea className=\"form_input\" value={this.state.content}/>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_password\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <button type=\"button\" className=\"form_submit_button\" onClick={this.Goback}>Back</button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n ) \r\n } else {\r\n return(\r\n <div className=\"showList\">\r\n <table>\r\n <tr>\r\n <th>Index</th>\r\n <th>Title</th>\r\n </tr>\r\n {format}\r\n </table>\r\n </div> \r\n ) \r\n } \r\n }\r\n}\r\n\r\nexport default withRouter(MList)","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\request.js",["83"],"import axios from 'axios';\r\n\r\nconst API_DEFAULT = \"http://localhost:3001/\";\r\nconst instance = axios.create({ baseURL: API_DEFAULT });\r\n\r\nexport async function getUser() {\r\n const result = await instance.get('/');\r\n console.log(result)\r\n return result.data\r\n}\r\n\r\nexport async function dropUser() {\r\n const result = await instance.get('/logout');\r\n return result.data\r\n}\r\n\r\n// export async function searchUser(email) {\r\n// const result = await instance.get('/login' + email);\r\n// return result.data\r\n// }\r\n\r\nexport async function putUser({username, email, password}) {\r\n const result = await instance.post('/routes/save', {\r\n username: username,\r\n email: email, \r\n password: password \r\n });\r\n console.log(result);\r\n return result.data\r\n}\r\n\r\nexport async function checkUser({email, password}) {\r\n const result = await instance.post('/routes/login', {\r\n email: email, \r\n password: password \r\n });\r\n console.log(result);\r\n return result.data\r\n}\r\n\r\nexport async function joinList({title, description}) {\r\n const result = await instance.post('/routes/join', {\r\n title: title,\r\n description: description\r\n });\r\n return result.data\r\n}\r\n\r\nexport async function matchList({title, description}) {\r\n const result = await instance.post('/routes/match', {\r\n title: title,\r\n description: description\r\n });\r\n return result.data\r\n}\r\n\r\nexport async function infoList({name, time, location}) {\r\n const result = await instance.post('/routes/info', {\r\n name: name,\r\n time: time,\r\n location: location\r\n });\r\n console.log(result.data)\r\n return result.data\r\n}\r\n\r\nexport async function getJoinList() {\r\n const result = await instance.get('/routes/join/return');\r\n return result.data;\r\n}\r\n\r\nexport async function getMatchList() {\r\n const result = await instance.get('/routes/match/return');\r\n return result.data;\r\n}\r\n\r\nexport async function getInfoList() {\r\n const result = await instance.get('/routes/info/return');\r\n return result.data;\r\n}\r\n\r\nexport default {\r\n getUser,\r\n dropUser,\r\n putUser,\r\n checkUser,\r\n // searchUser,\r\n joinList,\r\n matchList,\r\n getJoinList,\r\n getMatchList,\r\n infoList,\r\n getInfoList\r\n}\r\n\r\n\r\n\r\n\r\n","C:\\Users\\82106\\Desktop\\Final_project\\web-project\\client\\src\\components\\InList.js",[],{"ruleId":"84","replacedBy":"85"},{"ruleId":"86","replacedBy":"87"},{"ruleId":"88","severity":1,"message":"89","line":32,"column":30,"nodeType":"90","messageId":"91","endLine":32,"endColumn":32},{"ruleId":"92","severity":1,"message":"93","line":4,"column":10,"nodeType":"94","messageId":"95","endLine":4,"endColumn":23},{"ruleId":"92","severity":1,"message":"96","line":4,"column":37,"nodeType":"94","messageId":"95","endLine":4,"endColumn":43},{"ruleId":"92","severity":1,"message":"97","line":4,"column":45,"nodeType":"94","messageId":"95","endLine":4,"endColumn":50},{"ruleId":"92","severity":1,"message":"98","line":4,"column":52,"nodeType":"94","messageId":"95","endLine":4,"endColumn":56},{"ruleId":"99","severity":1,"message":"100","line":85,"column":39,"nodeType":"101","messageId":"102","endLine":85,"endColumn":41},{"ruleId":"92","severity":1,"message":"103","line":4,"column":22,"nodeType":"94","messageId":"95","endLine":4,"endColumn":30},{"ruleId":"92","severity":1,"message":"103","line":3,"column":22,"nodeType":"94","messageId":"95","endLine":3,"endColumn":30},{"ruleId":"99","severity":1,"message":"100","line":19,"column":35,"nodeType":"101","messageId":"102","endLine":19,"endColumn":37},{"ruleId":"99","severity":1,"message":"100","line":48,"column":39,"nodeType":"101","messageId":"102","endLine":48,"endColumn":41},{"ruleId":"99","severity":1,"message":"100","line":19,"column":35,"nodeType":"101","messageId":"102","endLine":19,"endColumn":37},{"ruleId":"99","severity":1,"message":"100","line":48,"column":39,"nodeType":"101","messageId":"102","endLine":48,"endColumn":41},{"ruleId":"104","severity":1,"message":"105","line":82,"column":1,"nodeType":"106","endLine":94,"endColumn":2},"no-native-reassign",["107"],"no-negated-in-lhs",["108"],"eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","no-unused-vars","'BrowserRouter' is defined but never used.","Identifier","unusedVar","'Switch' is defined but never used.","'Route' is defined but never used.","'Link' is defined but never used.","array-callback-return","Array.prototype.map() expects a return value from arrow function.","ArrowFunctionExpression","expectedInside","'Redirect' is defined but never used.","import/no-anonymous-default-export","Assign object to a variable before exporting as module default","ExportDefaultDeclaration","no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/home/ubuntu/Final/web-project/client/src/index.js":"1","/home/ubuntu/Final/web-project/client/src/reportWebVitals.js":"2","/home/ubuntu/Final/web-project/client/src/App.js":"3","/home/ubuntu/Final/web-project/client/src/components/Header.js":"4","/home/ubuntu/Final/web-project/client/src/components/Menu.js":"5","/home/ubuntu/Final/web-project/client/src/components/Home.js":"6","/home/ubuntu/Final/web-project/client/src/components/Login.js":"7","/home/ubuntu/Final/web-project/client/src/request.js":"8","/home/ubuntu/Final/web-project/client/src/components/Match.js":"9","/home/ubuntu/Final/web-project/client/src/components/Signup.js":"10","/home/ubuntu/Final/web-project/client/src/components/Join.js":"11","/home/ubuntu/Final/web-project/client/src/components/Info.js":"12","/home/ubuntu/Final/web-project/client/src/components/JList.js":"13","/home/ubuntu/Final/web-project/client/src/components/InList.js":"14","/home/ubuntu/Final/web-project/client/src/components/MList.js":"15"},{"size":500,"mtime":1607802158940,"results":"16","hashOfConfig":"17"},{"size":362,"mtime":1607802158940,"results":"18","hashOfConfig":"17"},{"size":986,"mtime":1607802158936,"results":"19","hashOfConfig":"17"},{"size":2996,"mtime":1607802158940,"results":"20","hashOfConfig":"17"},{"size":1049,"mtime":1607802158940,"results":"21","hashOfConfig":"17"},{"size":306,"mtime":1607802158940,"results":"22","hashOfConfig":"17"},{"size":3498,"mtime":1607802861396,"results":"23","hashOfConfig":"17"},{"size":2308,"mtime":1607803202150,"results":"24","hashOfConfig":"17"},{"size":3234,"mtime":1607807438420,"results":"25","hashOfConfig":"17"},{"size":5315,"mtime":1607802861396,"results":"26","hashOfConfig":"17"},{"size":3255,"mtime":1607807391523,"results":"27","hashOfConfig":"17"},{"size":3511,"mtime":1607802158940,"results":"28","hashOfConfig":"17"},{"size":3579,"mtime":1607805605248,"results":"29","hashOfConfig":"17"},{"size":3482,"mtime":1607802158940,"results":"30","hashOfConfig":"17"},{"size":3562,"mtime":1607805583460,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"19nib9l",{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"47","usedDeprecatedRules":"34"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"50","usedDeprecatedRules":"34"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"57","messages":"58","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"59","usedDeprecatedRules":"34"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/home/ubuntu/Final/web-project/client/src/index.js",[],["66","67"],"/home/ubuntu/Final/web-project/client/src/reportWebVitals.js",[],"/home/ubuntu/Final/web-project/client/src/App.js",[],"/home/ubuntu/Final/web-project/client/src/components/Header.js",[],"/home/ubuntu/Final/web-project/client/src/components/Menu.js",[],"/home/ubuntu/Final/web-project/client/src/components/Home.js",[],"/home/ubuntu/Final/web-project/client/src/components/Login.js",["68"],"import React from 'react'\r\nimport request from '../request'\r\nimport { withRouter } from 'react-router-dom';\r\n\r\nclass Login extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n email: \"\",\r\n password: \"\"\r\n }\r\n }\r\n email_value = (e) => {\r\n this.setState ({\r\n email: e.target.value\r\n });\r\n }\r\n pw_value = (e) => {\r\n this.setState({\r\n password: e.target.value\r\n });\r\n }\r\n handleSubmit= event => {\r\n event.preventDefault();\r\n \r\n const data = ({\r\n email: this.state.email,\r\n password: this.state.password\r\n })\r\n request.checkUser(data).then(result => {\r\n console.log(result);\r\n if(result.result == \"fail\") {\r\n alert(\"Wrong Input\");\r\n this.props.history.push('/login');\r\n }\r\n else {\r\n this.setState({\r\n email: result.email,\r\n password: result.password\r\n });\r\n sessionStorage.setItem(\"is_authen\", true);\r\n sessionStorage.setItem(\"username\", result.username);\r\n this.props.getName();\r\n this.props.history.push('/menu');\r\n }\r\n })\r\n \r\n }\r\n render() {\r\n return(\r\n <div id=\"container\" className=\"main_container\">\r\n <div className=\"login_container\">\r\n <form className=\"form_container\">\r\n <div className=\"form_container\">\r\n <div className=\"form_title_div\">\r\n <p className=\"form_title_p\">Member Login</p>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">email</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" placeholder=\"email\" className=\"form_input\" onChange={this.email_value}></input>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <div>\r\n <p className=\"form_item_name\">Password</p>\r\n </div>\r\n <div>\r\n <input type=\"password\" placeholder=\"Enter password\" className=\"form_input\" onChange={this.pw_value}></input>\r\n </div>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_password\" className=\"form_text_alert\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <input type=\"submit\" className=\"form_submit_button\" value=\"Submit\" onClick={this.handleSubmit.bind(this)}></input>\r\n </div>\r\n </div>\r\n </form> \r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nexport default withRouter(Login)","/home/ubuntu/Final/web-project/client/src/request.js",["69"],"import axios from 'axios';\r\n\r\nconst API_DEFAULT = \"http://13.125.86.34:3001/\";\r\nconst instance = axios.create({ baseURL: API_DEFAULT });\r\n\r\nexport async function getUser() {\r\n const result = await instance.get('/');\r\n console.log(result)\r\n return result.data\r\n}\r\n\r\nexport async function dropUser() {\r\n const result = await instance.get('/logout');\r\n return result.data\r\n}\r\n\r\n// export async function searchUser(email) {\r\n// const result = await instance.get('/login' + email);\r\n// return result.data\r\n// }\r\n\r\nexport async function putUser({username, email, password}) {\r\n const result = await instance.post('/routes/save', {\r\n username: username,\r\n email: email, \r\n password: password \r\n });\r\n console.log(result);\r\n return result.data\r\n}\r\n\r\nexport async function checkUser({email, password}) {\r\n const result = await instance.post('/routes/login', {\r\n email: email, \r\n password: password \r\n });\r\n console.log(result);\r\n return result.data\r\n}\r\n\r\nexport async function joinList({title, description}) {\r\n const result = await instance.post('/routes/join', {\r\n title: title,\r\n description: description\r\n });\r\n return result.data\r\n}\r\n\r\nexport async function matchList({title, description}) {\r\n const result = await instance.post('/routes/match', {\r\n title: title,\r\n description: description\r\n });\r\n return result.data\r\n}\r\n\r\nexport async function infoList({name, time, location}) {\r\n const result = await instance.post('/routes/info', {\r\n name: name,\r\n time: time,\r\n location: location\r\n });\r\n console.log(result.data)\r\n return result.data\r\n}\r\n\r\nexport async function getJoinList() {\r\n const result = await instance.get('/routes/join/return');\r\n return result.data;\r\n}\r\n\r\nexport async function getMatchList() {\r\n const result = await instance.get('/routes/match/return');\r\n return result.data;\r\n}\r\n\r\nexport async function getInfoList() {\r\n const result = await instance.get('/routes/info/return');\r\n return result.data;\r\n}\r\n\r\nexport default {\r\n getUser,\r\n dropUser,\r\n putUser,\r\n checkUser,\r\n // searchUser,\r\n joinList,\r\n matchList,\r\n getJoinList,\r\n getMatchList,\r\n infoList,\r\n getInfoList\r\n}\r\n\r\n\r\n\r\n\r\n","/home/ubuntu/Final/web-project/client/src/components/Match.js",[],"/home/ubuntu/Final/web-project/client/src/components/Signup.js",[],"/home/ubuntu/Final/web-project/client/src/components/Join.js",["70"],"/home/ubuntu/Final/web-project/client/src/components/Info.js",["71","72","73","74","75"],"import React from 'react'\r\nimport InList from './InList'\r\nimport request from '../request'\r\nimport { BrowserRouter, withRouter, Switch, Route, Link } from 'react-router-dom'\r\n\r\nclass Info extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n click: false,\r\n update: false,\r\n location: \"\",\r\n Lists: []\r\n }\r\n this.returnsearch = this.returnsearch.bind(this)\r\n }\r\n detect = event => {\r\n this.setState({\r\n location: event.target.value\r\n })\r\n }\r\n showList = event => {\r\n event.preventDefault();\r\n request.getInfoList().then().then(datas => {\r\n if(datas.length > 0) {\r\n const result = datas.filter(data => data.location === this.state.location)\r\n this.setState({\r\n Lists: result,\r\n click: true\r\n })\r\n }\r\n });\r\n }\r\n goBack = event => {\r\n event.preventDefault();\r\n this.setState({\r\n click: false\r\n })\r\n }\r\n returnsearch() {\r\n this.setState({\r\n update: false\r\n });\r\n }\r\n onUpate = event => {\r\n event.preventDefault();\r\n this.setState({\r\n update: true\r\n })\r\n }\r\n render() {\r\n if(this.state.update === true) {\r\n return(\r\n <InList return={this.returnsearch}></InList>\r\n )\r\n }\r\n if(this.state.click === false) {\r\n return(\r\n <div className=\"form_container\">\r\n <div className=\"searchLocation\">\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n <div>\r\n <p className=\"form_item_name\">search</p>\r\n </div>\r\n <div>\r\n <input type=\"text\" className=\"form_input\" onChange={this.detect}></input>\r\n </div>\r\n \r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n <button type=\"button\" onClick={this.showList} className=\"form_submit_button\">Search</button>\r\n <div className=\"form_text_alert_padding\">\r\n <div id=\"alert_username\" className=\"form_text_alert\"></div>\r\n </div>\r\n <button type=\"button\" className=\"form_submit_button\" onClick={this.onUpate.bind(this)}>New</button>\r\n \r\n </div>\r\n </div>\r\n )\r\n } else {\r\n const filter_list = [];\r\n this.state.Lists.map(list => {\r\n filter_list.push(<li>{list.time} {list.name}</li>)\r\n })\r\n return(\r\n <div className=\"form_container\">\r\n <p>경기장 리스트</p>\r\n <ul>\r\n {filter_list}\r\n </ul> \r\n <button type=\"button\" className=\"form_submit_button\" onClick={this.goBack}>Back</button>\r\n </div> \r\n )\r\n }\r\n }\r\n}\r\n\r\nexport default withRouter(Info)","/home/ubuntu/Final/web-project/client/src/components/JList.js",["76","77","78"],"/home/ubuntu/Final/web-project/client/src/components/InList.js",[],"/home/ubuntu/Final/web-project/client/src/components/MList.js",["79","80"],{"ruleId":"81","replacedBy":"82"},{"ruleId":"83","replacedBy":"84"},{"ruleId":"85","severity":1,"message":"86","line":32,"column":30,"nodeType":"87","messageId":"88","endLine":32,"endColumn":32},{"ruleId":"89","severity":1,"message":"90","line":82,"column":1,"nodeType":"91","endLine":94,"endColumn":2},{"ruleId":"92","severity":1,"message":"93","line":4,"column":22,"nodeType":"94","messageId":"95","endLine":4,"endColumn":30},{"ruleId":"92","severity":1,"message":"96","line":4,"column":10,"nodeType":"94","messageId":"95","endLine":4,"endColumn":23},{"ruleId":"92","severity":1,"message":"97","line":4,"column":37,"nodeType":"94","messageId":"95","endLine":4,"endColumn":43},{"ruleId":"92","severity":1,"message":"98","line":4,"column":45,"nodeType":"94","messageId":"95","endLine":4,"endColumn":50},{"ruleId":"92","severity":1,"message":"99","line":4,"column":52,"nodeType":"94","messageId":"95","endLine":4,"endColumn":56},{"ruleId":"100","severity":1,"message":"101","line":85,"column":39,"nodeType":"102","messageId":"103","endLine":85,"endColumn":41},{"ruleId":"92","severity":1,"message":"93","line":3,"column":22,"nodeType":"94","messageId":"95","endLine":3,"endColumn":30},{"ruleId":"100","severity":1,"message":"101","line":19,"column":35,"nodeType":"102","messageId":"103","endLine":19,"endColumn":37},{"ruleId":"100","severity":1,"message":"101","line":45,"column":39,"nodeType":"102","messageId":"103","endLine":45,"endColumn":41},{"ruleId":"100","severity":1,"message":"101","line":19,"column":35,"nodeType":"102","messageId":"103","endLine":19,"endColumn":37},{"ruleId":"100","severity":1,"message":"101","line":45,"column":39,"nodeType":"102","messageId":"103","endLine":45,"endColumn":41},"no-native-reassign",["104"],"no-negated-in-lhs",["105"],"eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","import/no-anonymous-default-export","Assign object to a variable before exporting as module default","ExportDefaultDeclaration","no-unused-vars","'Redirect' is defined but never used.","Identifier","unusedVar","'BrowserRouter' is defined but never used.","'Switch' is defined but never used.","'Route' is defined but never used.","'Link' is defined but never used.","array-callback-return","Array.prototype.map() expects a return value from arrow function.","ArrowFunctionExpression","expectedInside","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index fa464edf720f47025d763275039220c0583e3ea0..f8d9e1d5182779a47479379737329e97a2ade916 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -7462,6 +7462,19 @@ "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" }, + "history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "requires": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -7472,6 +7485,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -10309,6 +10330,15 @@ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" }, + "mini-create-react-context": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", + "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==", + "requires": { + "@babel/runtime": "^7.12.1", + "tiny-warning": "^1.0.3" + } + }, "mini-css-extract-plugin": { "version": "0.11.3", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.11.3.tgz", @@ -12895,6 +12925,52 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", "integrity": "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==" }, + "react-router": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", + "integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "mini-create-react-context": "^0.4.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "requires": { + "isarray": "0.0.1" + } + } + } + }, + "react-router-dom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz", + "integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.2.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + } + }, "react-scripts": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-4.0.1.tgz", @@ -13386,6 +13462,11 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, + "resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -15085,6 +15166,16 @@ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" }, + "tiny-invariant": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz", + "integrity": "sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw==" + }, + "tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", @@ -15676,6 +15767,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/client/package.json b/client/package.json index 8ec41a6e58bf87a38c43e86d2635eea4df018271..58d62778574e9a15c4b942cb7cac7ec9936aae7a 100644 --- a/client/package.json +++ b/client/package.json @@ -15,6 +15,7 @@ "nodemon": "^2.0.6", "react": "^17.0.1", "react-dom": "^17.0.1", + "react-router-dom": "^5.2.0", "react-scripts": "4.0.1", "web-vitals": "^0.2.4" }, @@ -45,5 +46,5 @@ "devDependencies": { "npm-run-all": "^4.1.5" }, - "proxy": "http://localhost:3001" + "proxy": "http://13.125.86.34:3001" } diff --git a/client/proxy.js b/client/proxy.js index bf3a68dfa4a35c67f607a9327a3b4349233a00ed..36da858a06aa8122c912081ed3e77c14a9a8b80c 100644 --- a/client/proxy.js +++ b/client/proxy.js @@ -2,9 +2,9 @@ const { createProxyMiddleware } = require('http-proxy-middleware'); module.exports = function(app) { app.use(createProxyMiddleware( '/',{ - target: 'http://localhost:3001/', + target: 'http://13.125.86.34:3001/', changeOrigin: true, secure: false }) ); -}; \ No newline at end of file +}; diff --git a/client/src/components/JList.js b/client/src/components/JList.js index c5aa4434b7565b828b4666a8357b93d7aafbb718..9e5b5f38a5a483b76e62ef45ab26e1295c7524d1 100644 --- a/client/src/components/JList.js +++ b/client/src/components/JList.js @@ -31,9 +31,6 @@ class JList extends React.Component { }); this.props.history.push('/join'); } - shouldComponentUpdate() { - return true; - } componentDidMount() { request.getJoinList().then().then(data => { this.setState({ @@ -105,4 +102,4 @@ class JList extends React.Component { } } -export default withRouter(JList) \ No newline at end of file +export default withRouter(JList) diff --git a/client/src/components/Join.js b/client/src/components/Join.js index 9c1401a7c74820c6db36d169761c0f74cfb916ac..efb1ec75183af5df87cc983a212a1d2111fc3e71 100644 --- a/client/src/components/Join.js +++ b/client/src/components/Join.js @@ -43,9 +43,8 @@ class Join extends React.Component { description: this.state.description }); - request.joinList(data).then(result => { - this.props.history.push('/join'); - }); + request.joinList(data); + this.props.history.push('/match'); } render() { if(this.state.click === false){ @@ -93,4 +92,4 @@ class Join extends React.Component { } } -export default withRouter(Join) \ No newline at end of file +export default withRouter(Join) diff --git a/client/src/components/MList.js b/client/src/components/MList.js index 65605f9d9da302d069f67bc54058292093631020..858647ce217d3e3a4e4d4780a169ffbb5f9530ad 100644 --- a/client/src/components/MList.js +++ b/client/src/components/MList.js @@ -31,9 +31,6 @@ class MList extends React.Component { }); this.props.history.push('/match'); } - shouldComponentUpdate() { - return true - } componentDidMount() { request.getMatchList().then().then(data => { this.setState({ @@ -104,4 +101,4 @@ class MList extends React.Component { } } -export default withRouter(MList) \ No newline at end of file +export default withRouter(MList) diff --git a/client/src/components/Match.js b/client/src/components/Match.js index 1227b739913023d7c1198b636db6e922fb626da8..0718c0b1c49b1ec4285730b8e8e73cfdc583df4b 100644 --- a/client/src/components/Match.js +++ b/client/src/components/Match.js @@ -43,9 +43,8 @@ class Match extends React.Component { description: this.state.description }); - request.matchList(data).then(result => { - // this.props.history.push('/match') - }); + request.matchList(data); + this.props.history.push('/info'); } render() { if(this.state.click === false){ @@ -92,4 +91,4 @@ class Match extends React.Component { } } -export default withRouter(Match) \ No newline at end of file +export default withRouter(Match) diff --git a/client/src/request.js b/client/src/request.js index 21dfa5b7ab517e3278038b8122f8b54c39309bb5..146b1a518ce1c68161d61fde6683406309172d60 100644 --- a/client/src/request.js +++ b/client/src/request.js @@ -1,6 +1,6 @@ import axios from 'axios'; -const API_DEFAULT = "http://localhost:3001/"; +const API_DEFAULT = "http://13.125.86.34:3001/"; const instance = axios.create({ baseURL: API_DEFAULT }); export async function getUser() { diff --git a/server/node_modules/.bin/concurrently b/server/node_modules/.bin/concurrently old mode 100644 new mode 100755