Commit ff493dfa authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

.

parent 2c820a72
[{"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\index.js":"1","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\reportWebVitals.js":"2","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js":"3","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Login.js":"4","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\catchErrors.js":"5","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Signup.js":"6","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\auth.js":"7","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js":"8","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Search.js":"9","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js":"10","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\PrivateRoute.js":"11","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Bookmark.js":"12"},{"size":1267,"mtime":1611500254459,"results":"13","hashOfConfig":"14"},{"size":362,"mtime":499162500000,"results":"15","hashOfConfig":"14"},{"size":1650,"mtime":1611552739016,"results":"16","hashOfConfig":"14"},{"size":3147,"mtime":1611553267391,"results":"17","hashOfConfig":"14"},{"size":405,"mtime":1609915408569,"results":"18","hashOfConfig":"14"},{"size":2995,"mtime":1611489922054,"results":"19","hashOfConfig":"14"},{"size":726,"mtime":1611495738863,"results":"20","hashOfConfig":"14"},{"size":2199,"mtime":1610503781980,"results":"21","hashOfConfig":"14"},{"size":10588,"mtime":1611553924601,"results":"22","hashOfConfig":"14"},{"size":2167,"mtime":1611500202857,"results":"23","hashOfConfig":"14"},{"size":486,"mtime":1611489922054,"results":"24","hashOfConfig":"14"},{"size":2668,"mtime":1611558320008,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"28","usedDeprecatedRules":"29"},"1t9w6go",{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34","usedDeprecatedRules":"29"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":14,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"47","messages":"48","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"49","usedDeprecatedRules":"29"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":15,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\index.js",["54"],"import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\nimport App from './App'\r\nimport Search from './Search';\r\nimport reportWebVitals from './reportWebVitals';\r\nimport Signup from './Components/Signup'\r\nimport Login from './Components/Login'\r\nimport PrivateRoute from \"./Components/PrivateRoute\";\r\nimport axios from 'axios'\r\nimport Bookmark from \"./Bookmark\"\r\nimport {\r\n BrowserRouter as Router,\r\n Switch,\r\n Route,\r\n Redirect,\r\n} from \"react-router-dom\";\r\n\r\nReactDOM.render(\r\n <React.StrictMode>\r\n <Router>\r\n <Switch>\r\n <Route exact path=\"/\" component={App} />\r\n <Route path=\"/search\" component={Search} />\r\n <Route path='/signup' component={Signup}/>\r\n <Route path='/login' component={Login} />\r\n <PrivateRoute path='/bookmark'><Bookmark/></PrivateRoute>\r\n <Redirect path=\"/search\" to=\"/search\" />\r\n </Switch>\r\n </Router>\r\n </React.StrictMode>,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n",["55","56"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js",["57","58"],"import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Modal, Container, Row, Button, } from 'react-bootstrap';\r\n\r\nfunction Place(props) {\r\n const [reviews, setReviews] = useState()\r\n const [db, setDb] = useState(false)\r\n const getReview = () => {\r\n axios({ url: `/api/review?keyword=${props.place.name}`, method: 'post', data: { db: db } })\r\n .then(res => {\r\n console.log(\"place res.data\", res.data)\r\n setReviews(res.data)\r\n })\r\n .catch(err => {\r\n console.log(err)\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n getReview();\r\n }, [])\r\n\r\n return (\r\n <Modal {...props}\r\n size=\"xl\"\r\n keyboard=\"true\"\r\n variant=\"backdrop.in\"\r\n aria-labelledby=\"example-modal-sizes-title-lg\">\r\n <Modal.Header closeButton>\r\n <Modal.Title id=\"contained-modal-title-vcenter\" style={{ fontSize: '40px' }}>\r\n {props.index + 1}. {props.place.name}\r\n </Modal.Title>\r\n </Modal.Header>\r\n <Modal.Body className=\"show-grid\">\r\n <Container style={{ fontSize: '40px' }}>\r\n {Array.isArray(reviews) ? reviews.map((review, index) => {\r\n return (\r\n <Row className=\"mt-4\">\r\n <a href={review.link}>{review.title}</a>\r\n <div>{review.summary}</div>\r\n <div>{review.content}</div>\r\n </Row>\r\n )\r\n })\r\n : \"리뷰가 없습니다.\"}\r\n </Container>\r\n\r\n </Modal.Body>\r\n <Modal.Footer>\r\n <Button block onClick={props.onHide}>Close</Button>\r\n </Modal.Footer>\r\n </Modal>\r\n );\r\n}\r\n\r\nexport default Place;\r\n","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Login.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\catchErrors.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Signup.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\auth.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Search.js",["59","60","61","62","63","64","65","66","67","68","69","70","71","72"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js",["73","74","75","76"],"import React, { useEffect, useState } from 'react';\r\nimport { Link, Redirect } from 'react-router-dom';\r\nimport ohuh from './ohuh.PNG'\r\nimport { Container, Row, Form, Image, InputGroup, Button, Col, FormControl, Navbar, Nav } from 'react-bootstrap';\r\nimport { handleLogout, isAuthenticated } from './utils/auth.js'\r\n\r\nfunction App() {\r\n const [state, setState] = useState(false);\r\n const [search, setSearch] = useState(\"\");\r\n const user = isAuthenticated()\r\n\r\n if (state !== false) {\r\n return <Redirect to={`/search?keyword=${search}`} />;\r\n }\r\n\r\n const handleChange = (e) => {\r\n setSearch(e.target.value);\r\n } //바뀌는 것이 있을때 이벤트 발생\r\n\r\n const handleSubmit = () => {\r\n setState(true);\r\n } //submit 버튼을 누르면 state 값을 true로 바뀐다\r\n\r\n return (\r\n <Container className=\"vh-100 d-flex justify-content-md-center align-items-center\">\r\n <Col md={6} style={{ marginTop: 140 }}>\r\n <Nav className=\"justify-content-end\" bg=\"#fff\" variant=\"light\" >\r\n {user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>\r\n : (\r\n <>\r\n <Nav.Link href=\"/signup\">회원가입</Nav.Link>\r\n <Nav.Link href=\"/login\">로그인</Nav.Link>\r\n </>\r\n )}\r\n <Nav.Link href='/bookmark'>북마크</Nav.Link>\r\n </Nav>\r\n <Row style={{ marginBottom: 20 }}>\r\n <Image src={ohuh} />\r\n </Row>\r\n <Row style={{ marginBottom: 500 }}>\r\n <Form className=\"vw-100\" onSubmit={handleSubmit}>\r\n <InputGroup style={{ width: 560 }}>\r\n <Form.Control\r\n size=\"lg\"\r\n placeholder=\"검색어를 입력하세요.\"\r\n aria-label=\"Large\"\r\n aria-describedby=\"inputGroup-sizing-sm\"\r\n onChange={handleChange}\r\n />\r\n <InputGroup.Append>\r\n <Button type='submit' variant=\"outline-secondary\">검색</Button>\r\n </InputGroup.Append>\r\n </InputGroup>\r\n </Form>\r\n </Row>\r\n </Col>\r\n </Container>\r\n );\r\n}\r\n\r\nexport default App;\r\n","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\PrivateRoute.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Bookmark.js",["77","78","79","80","81","82","83","84","85","86","87","88","89","90","91"],{"ruleId":"92","severity":1,"message":"93","line":11,"column":8,"nodeType":"94","messageId":"95","endLine":11,"endColumn":13},{"ruleId":"96","replacedBy":"97"},{"ruleId":"98","replacedBy":"99"},{"ruleId":"92","severity":1,"message":"100","line":7,"column":14,"nodeType":"94","messageId":"95","endLine":7,"endColumn":19},{"ruleId":"101","severity":1,"message":"102","line":21,"column":6,"nodeType":"103","endLine":21,"endColumn":8,"suggestions":"104"},{"ruleId":"92","severity":1,"message":"105","line":5,"column":83,"nodeType":"94","messageId":"95","endLine":5,"endColumn":88},{"ruleId":"92","severity":1,"message":"106","line":7,"column":8,"nodeType":"94","messageId":"95","endLine":7,"endColumn":19},{"ruleId":"92","severity":1,"message":"93","line":9,"column":8,"nodeType":"94","messageId":"95","endLine":9,"endColumn":13},{"ruleId":"92","severity":1,"message":"107","line":22,"column":12,"nodeType":"94","messageId":"95","endLine":22,"endColumn":18},{"ruleId":"92","severity":1,"message":"108","line":23,"column":12,"nodeType":"94","messageId":"95","endLine":23,"endColumn":16},{"ruleId":"92","severity":1,"message":"109","line":24,"column":12,"nodeType":"94","messageId":"95","endLine":24,"endColumn":16},{"ruleId":"92","severity":1,"message":"110","line":24,"column":18,"nodeType":"94","messageId":"95","endLine":24,"endColumn":25},{"ruleId":"92","severity":1,"message":"111","line":25,"column":12,"nodeType":"94","messageId":"95","endLine":25,"endColumn":19},{"ruleId":"92","severity":1,"message":"112","line":25,"column":21,"nodeType":"94","messageId":"95","endLine":25,"endColumn":31},{"ruleId":"92","severity":1,"message":"113","line":26,"column":12,"nodeType":"94","messageId":"95","endLine":26,"endColumn":17},{"ruleId":"92","severity":1,"message":"114","line":26,"column":19,"nodeType":"94","messageId":"95","endLine":26,"endColumn":27},{"ruleId":"92","severity":1,"message":"115","line":28,"column":11,"nodeType":"94","messageId":"95","endLine":28,"endColumn":22},{"ruleId":"92","severity":1,"message":"116","line":29,"column":11,"nodeType":"94","messageId":"95","endLine":29,"endColumn":21},{"ruleId":"117","severity":1,"message":"118","line":99,"column":35,"nodeType":"119","endLine":99,"endColumn":76},{"ruleId":"92","severity":1,"message":"120","line":1,"column":17,"nodeType":"94","messageId":"95","endLine":1,"endColumn":26},{"ruleId":"92","severity":1,"message":"121","line":2,"column":10,"nodeType":"94","messageId":"95","endLine":2,"endColumn":14},{"ruleId":"92","severity":1,"message":"122","line":4,"column":64,"nodeType":"94","messageId":"95","endLine":4,"endColumn":75},{"ruleId":"92","severity":1,"message":"123","line":4,"column":77,"nodeType":"94","messageId":"95","endLine":4,"endColumn":83},{"ruleId":"92","severity":1,"message":"120","line":1,"column":27,"nodeType":"94","messageId":"95","endLine":1,"endColumn":36},{"ruleId":"92","severity":1,"message":"124","line":2,"column":10,"nodeType":"94","messageId":"95","endLine":2,"endColumn":15},{"ruleId":"92","severity":1,"message":"125","line":2,"column":17,"nodeType":"94","messageId":"95","endLine":2,"endColumn":20},{"ruleId":"92","severity":1,"message":"126","line":2,"column":22,"nodeType":"94","messageId":"95","endLine":2,"endColumn":26},{"ruleId":"92","severity":1,"message":"127","line":2,"column":45,"nodeType":"94","messageId":"95","endLine":2,"endColumn":48},{"ruleId":"92","severity":1,"message":"128","line":2,"column":82,"nodeType":"94","messageId":"95","endLine":2,"endColumn":87},{"ruleId":"92","severity":1,"message":"129","line":2,"column":89,"nodeType":"94","messageId":"95","endLine":2,"endColumn":94},{"ruleId":"92","severity":1,"message":"130","line":13,"column":7,"nodeType":"94","messageId":"95","endLine":13,"endColumn":11},{"ruleId":"92","severity":1,"message":"110","line":16,"column":18,"nodeType":"94","messageId":"95","endLine":16,"endColumn":25},{"ruleId":"92","severity":1,"message":"113","line":17,"column":12,"nodeType":"94","messageId":"95","endLine":17,"endColumn":17},{"ruleId":"92","severity":1,"message":"111","line":18,"column":12,"nodeType":"94","messageId":"95","endLine":18,"endColumn":19},{"ruleId":"92","severity":1,"message":"112","line":18,"column":21,"nodeType":"94","messageId":"95","endLine":18,"endColumn":31},{"ruleId":"92","severity":1,"message":"131","line":19,"column":12,"nodeType":"94","messageId":"95","endLine":19,"endColumn":17},{"ruleId":"92","severity":1,"message":"132","line":19,"column":19,"nodeType":"94","messageId":"95","endLine":19,"endColumn":27},{"ruleId":"92","severity":1,"message":"130","line":21,"column":11,"nodeType":"94","messageId":"95","endLine":21,"endColumn":15},"no-unused-vars","'axios' is defined but never used.","Identifier","unusedVar","no-native-reassign",["133"],"no-negated-in-lhs",["134"],"'setDb' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getReview'. Either include it or remove the dependency array.","ArrayExpression",["135"],"'Modal' is defined but never used.","'catchErrors' is defined but never used.","'mobile' is assigned a value but never used.","'show' is assigned a value but never used.","'page' is assigned a value but never used.","'setPage' is assigned a value but never used.","'success' is assigned a value but never used.","'setSuccess' is assigned a value but never used.","'error' is assigned a value but never used.","'setError' is assigned a value but never used.","'handleClose' is assigned a value but never used.","'handleShow' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'useEffect' is defined but never used.","'Link' is defined but never used.","'FormControl' is defined but never used.","'Navbar' is defined but never used.","'Alert' is defined but never used.","'Col' is defined but never used.","'Card' is defined but never used.","'Row' is defined but never used.","'Image' is defined but never used.","'Table' is defined but never used.","'user' is assigned a value but never used.","'state' is assigned a value but never used.","'setState' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"136","fix":"137"},"Update the dependencies array to be: [getReview]",{"range":"138","text":"139"},[605,607],"[getReview]"] [{"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\index.js":"1","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\reportWebVitals.js":"2","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js":"3","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Login.js":"4","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\catchErrors.js":"5","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Signup.js":"6","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\auth.js":"7","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js":"8","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Search.js":"9","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js":"10","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\PrivateRoute.js":"11","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Bookmark.js":"12"},{"size":1267,"mtime":1611500254459,"results":"13","hashOfConfig":"14"},{"size":362,"mtime":499162500000,"results":"15","hashOfConfig":"14"},{"size":1650,"mtime":1611552739016,"results":"16","hashOfConfig":"14"},{"size":3147,"mtime":1611553267391,"results":"17","hashOfConfig":"14"},{"size":405,"mtime":1609915408569,"results":"18","hashOfConfig":"14"},{"size":2995,"mtime":1611489922054,"results":"19","hashOfConfig":"14"},{"size":726,"mtime":1611495738863,"results":"20","hashOfConfig":"14"},{"size":2199,"mtime":1610503781980,"results":"21","hashOfConfig":"14"},{"size":10587,"mtime":1611559111686,"results":"22","hashOfConfig":"14"},{"size":2167,"mtime":1611500202857,"results":"23","hashOfConfig":"14"},{"size":486,"mtime":1611489922054,"results":"24","hashOfConfig":"14"},{"size":2668,"mtime":1611558320008,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"28","usedDeprecatedRules":"29"},"1t9w6go",{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34","usedDeprecatedRules":"29"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":11,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"47","messages":"48","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"49","usedDeprecatedRules":"29"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"29"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":15,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\index.js",["54"],"import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\nimport App from './App'\r\nimport Search from './Search';\r\nimport reportWebVitals from './reportWebVitals';\r\nimport Signup from './Components/Signup'\r\nimport Login from './Components/Login'\r\nimport PrivateRoute from \"./Components/PrivateRoute\";\r\nimport axios from 'axios'\r\nimport Bookmark from \"./Bookmark\"\r\nimport {\r\n BrowserRouter as Router,\r\n Switch,\r\n Route,\r\n Redirect,\r\n} from \"react-router-dom\";\r\n\r\nReactDOM.render(\r\n <React.StrictMode>\r\n <Router>\r\n <Switch>\r\n <Route exact path=\"/\" component={App} />\r\n <Route path=\"/search\" component={Search} />\r\n <Route path='/signup' component={Signup}/>\r\n <Route path='/login' component={Login} />\r\n <PrivateRoute path='/bookmark'><Bookmark/></PrivateRoute>\r\n <Redirect path=\"/search\" to=\"/search\" />\r\n </Switch>\r\n </Router>\r\n </React.StrictMode>,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n",["55","56"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js",["57","58"],"import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Modal, Container, Row, Button, } from 'react-bootstrap';\r\n\r\nfunction Place(props) {\r\n const [reviews, setReviews] = useState()\r\n const [db, setDb] = useState(false)\r\n const getReview = () => {\r\n axios({ url: `/api/review?keyword=${props.place.name}`, method: 'post', data: { db: db } })\r\n .then(res => {\r\n console.log(\"place res.data\", res.data)\r\n setReviews(res.data)\r\n })\r\n .catch(err => {\r\n console.log(err)\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n getReview();\r\n }, [])\r\n\r\n return (\r\n <Modal {...props}\r\n size=\"xl\"\r\n keyboard=\"true\"\r\n variant=\"backdrop.in\"\r\n aria-labelledby=\"example-modal-sizes-title-lg\">\r\n <Modal.Header closeButton>\r\n <Modal.Title id=\"contained-modal-title-vcenter\" style={{ fontSize: '40px' }}>\r\n {props.index + 1}. {props.place.name}\r\n </Modal.Title>\r\n </Modal.Header>\r\n <Modal.Body className=\"show-grid\">\r\n <Container style={{ fontSize: '40px' }}>\r\n {Array.isArray(reviews) ? reviews.map((review, index) => {\r\n return (\r\n <Row className=\"mt-4\">\r\n <a href={review.link}>{review.title}</a>\r\n <div>{review.summary}</div>\r\n <div>{review.content}</div>\r\n </Row>\r\n )\r\n })\r\n : \"리뷰가 없습니다.\"}\r\n </Container>\r\n\r\n </Modal.Body>\r\n <Modal.Footer>\r\n <Button block onClick={props.onHide}>Close</Button>\r\n </Modal.Footer>\r\n </Modal>\r\n );\r\n}\r\n\r\nexport default Place;\r\n","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Login.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\catchErrors.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Signup.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\auth.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Search.js",["59","60","61","62","63","64","65","66","67","68","69"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js",["70","71","72","73"],"import React, { useEffect, useState } from 'react';\r\nimport { Link, Redirect } from 'react-router-dom';\r\nimport ohuh from './ohuh.PNG'\r\nimport { Container, Row, Form, Image, InputGroup, Button, Col, FormControl, Navbar, Nav } from 'react-bootstrap';\r\nimport { handleLogout, isAuthenticated } from './utils/auth.js'\r\n\r\nfunction App() {\r\n const [state, setState] = useState(false);\r\n const [search, setSearch] = useState(\"\");\r\n const user = isAuthenticated()\r\n\r\n if (state !== false) {\r\n return <Redirect to={`/search?keyword=${search}`} />;\r\n }\r\n\r\n const handleChange = (e) => {\r\n setSearch(e.target.value);\r\n } //바뀌는 것이 있을때 이벤트 발생\r\n\r\n const handleSubmit = () => {\r\n setState(true);\r\n } //submit 버튼을 누르면 state 값을 true로 바뀐다\r\n\r\n return (\r\n <Container className=\"vh-100 d-flex justify-content-md-center align-items-center\">\r\n <Col md={6} style={{ marginTop: 140 }}>\r\n <Nav className=\"justify-content-end\" bg=\"#fff\" variant=\"light\" >\r\n {user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>\r\n : (\r\n <>\r\n <Nav.Link href=\"/signup\">회원가입</Nav.Link>\r\n <Nav.Link href=\"/login\">로그인</Nav.Link>\r\n </>\r\n )}\r\n <Nav.Link href='/bookmark'>북마크</Nav.Link>\r\n </Nav>\r\n <Row style={{ marginBottom: 20 }}>\r\n <Image src={ohuh} />\r\n </Row>\r\n <Row style={{ marginBottom: 500 }}>\r\n <Form className=\"vw-100\" onSubmit={handleSubmit}>\r\n <InputGroup style={{ width: 560 }}>\r\n <Form.Control\r\n size=\"lg\"\r\n placeholder=\"검색어를 입력하세요.\"\r\n aria-label=\"Large\"\r\n aria-describedby=\"inputGroup-sizing-sm\"\r\n onChange={handleChange}\r\n />\r\n <InputGroup.Append>\r\n <Button type='submit' variant=\"outline-secondary\">검색</Button>\r\n </InputGroup.Append>\r\n </InputGroup>\r\n </Form>\r\n </Row>\r\n </Col>\r\n </Container>\r\n );\r\n}\r\n\r\nexport default App;\r\n","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\PrivateRoute.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Bookmark.js",["74","75","76","77","78","79","80","81","82","83","84","85","86","87","88"],{"ruleId":"89","severity":1,"message":"90","line":11,"column":8,"nodeType":"91","messageId":"92","endLine":11,"endColumn":13},{"ruleId":"93","replacedBy":"94"},{"ruleId":"95","replacedBy":"96"},{"ruleId":"89","severity":1,"message":"97","line":7,"column":14,"nodeType":"91","messageId":"92","endLine":7,"endColumn":19},{"ruleId":"98","severity":1,"message":"99","line":21,"column":6,"nodeType":"100","endLine":21,"endColumn":8,"suggestions":"101"},{"ruleId":"89","severity":1,"message":"102","line":22,"column":12,"nodeType":"91","messageId":"92","endLine":22,"endColumn":18},{"ruleId":"89","severity":1,"message":"103","line":23,"column":12,"nodeType":"91","messageId":"92","endLine":23,"endColumn":16},{"ruleId":"89","severity":1,"message":"104","line":24,"column":12,"nodeType":"91","messageId":"92","endLine":24,"endColumn":16},{"ruleId":"89","severity":1,"message":"105","line":24,"column":18,"nodeType":"91","messageId":"92","endLine":24,"endColumn":25},{"ruleId":"89","severity":1,"message":"106","line":25,"column":12,"nodeType":"91","messageId":"92","endLine":25,"endColumn":19},{"ruleId":"89","severity":1,"message":"107","line":25,"column":21,"nodeType":"91","messageId":"92","endLine":25,"endColumn":31},{"ruleId":"89","severity":1,"message":"108","line":26,"column":12,"nodeType":"91","messageId":"92","endLine":26,"endColumn":17},{"ruleId":"89","severity":1,"message":"109","line":26,"column":19,"nodeType":"91","messageId":"92","endLine":26,"endColumn":27},{"ruleId":"89","severity":1,"message":"110","line":28,"column":11,"nodeType":"91","messageId":"92","endLine":28,"endColumn":22},{"ruleId":"89","severity":1,"message":"111","line":29,"column":11,"nodeType":"91","messageId":"92","endLine":29,"endColumn":21},{"ruleId":"112","severity":1,"message":"113","line":99,"column":35,"nodeType":"114","endLine":99,"endColumn":76},{"ruleId":"89","severity":1,"message":"115","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":26},{"ruleId":"89","severity":1,"message":"116","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":14},{"ruleId":"89","severity":1,"message":"117","line":4,"column":64,"nodeType":"91","messageId":"92","endLine":4,"endColumn":75},{"ruleId":"89","severity":1,"message":"118","line":4,"column":77,"nodeType":"91","messageId":"92","endLine":4,"endColumn":83},{"ruleId":"89","severity":1,"message":"115","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"119","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":15},{"ruleId":"89","severity":1,"message":"120","line":2,"column":17,"nodeType":"91","messageId":"92","endLine":2,"endColumn":20},{"ruleId":"89","severity":1,"message":"121","line":2,"column":22,"nodeType":"91","messageId":"92","endLine":2,"endColumn":26},{"ruleId":"89","severity":1,"message":"122","line":2,"column":45,"nodeType":"91","messageId":"92","endLine":2,"endColumn":48},{"ruleId":"89","severity":1,"message":"123","line":2,"column":82,"nodeType":"91","messageId":"92","endLine":2,"endColumn":87},{"ruleId":"89","severity":1,"message":"124","line":2,"column":89,"nodeType":"91","messageId":"92","endLine":2,"endColumn":94},{"ruleId":"89","severity":1,"message":"125","line":13,"column":7,"nodeType":"91","messageId":"92","endLine":13,"endColumn":11},{"ruleId":"89","severity":1,"message":"105","line":16,"column":18,"nodeType":"91","messageId":"92","endLine":16,"endColumn":25},{"ruleId":"89","severity":1,"message":"108","line":17,"column":12,"nodeType":"91","messageId":"92","endLine":17,"endColumn":17},{"ruleId":"89","severity":1,"message":"106","line":18,"column":12,"nodeType":"91","messageId":"92","endLine":18,"endColumn":19},{"ruleId":"89","severity":1,"message":"107","line":18,"column":21,"nodeType":"91","messageId":"92","endLine":18,"endColumn":31},{"ruleId":"89","severity":1,"message":"126","line":19,"column":12,"nodeType":"91","messageId":"92","endLine":19,"endColumn":17},{"ruleId":"89","severity":1,"message":"127","line":19,"column":19,"nodeType":"91","messageId":"92","endLine":19,"endColumn":27},{"ruleId":"89","severity":1,"message":"125","line":21,"column":11,"nodeType":"91","messageId":"92","endLine":21,"endColumn":15},"no-unused-vars","'axios' is defined but never used.","Identifier","unusedVar","no-native-reassign",["128"],"no-negated-in-lhs",["129"],"'setDb' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getReview'. Either include it or remove the dependency array.","ArrayExpression",["130"],"'mobile' is assigned a value but never used.","'show' is assigned a value but never used.","'page' is assigned a value but never used.","'setPage' is assigned a value but never used.","'success' is assigned a value but never used.","'setSuccess' is assigned a value but never used.","'error' is assigned a value but never used.","'setError' is assigned a value but never used.","'handleClose' is assigned a value but never used.","'handleShow' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'useEffect' is defined but never used.","'Link' is defined but never used.","'FormControl' is defined but never used.","'Navbar' is defined but never used.","'Alert' is defined but never used.","'Col' is defined but never used.","'Card' is defined but never used.","'Row' is defined but never used.","'Image' is defined but never used.","'Table' is defined but never used.","'user' is assigned a value but never used.","'state' is assigned a value but never used.","'setState' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"131","fix":"132"},"Update the dependencies array to be: [getReview]",{"range":"133","text":"134"},[605,607],"[getReview]"]
\ No newline at end of file \ No newline at end of file
...@@ -2,11 +2,11 @@ import React, { useState, useEffect } from 'react'; ...@@ -2,11 +2,11 @@ import React, { useState, useEffect } from 'react';
import { Link, Redirect } from 'react-router-dom'; import { Link, Redirect } from 'react-router-dom';
import ohuh from './ohuh-sm.PNG'; import ohuh from './ohuh-sm.PNG';
import Place from './Components/Place'; import Place from './Components/Place';
import { Container, Form, Row, Col, Card, Image, InputGroup, FormControl, Button, Modal } from 'react-bootstrap'; import { Container, Form, Row, Col, Card, Image, InputGroup, FormControl, Button } from 'react-bootstrap';
import Paginations from './Components/Paginations.js' import Paginations from './Components/Paginations.js'
import catchErrors from './utils/catchErrors.js' // import catchErrors from './utils/catchErrors.js'
// import * as Icon from 'react-bootstrap-icons'; // import * as Icon from 'react-bootstrap-icons';
import axios from "axios"; // import axios from "axios";
const INIT_PAGE = { const INIT_PAGE = {
title: '', title: '',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment