Commit 555bea50 authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

.

parent c8d82d40
[{"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\\pagination.js":"3","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js":"4","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Login.js":"5","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\catchErrors.js":"6","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Signup.js":"7","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\auth.js":"8","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js":"9","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Search.js":"10","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js":"11","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\PrivateRoute.js":"12","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Bookmark.js":"13"},{"size":1278,"mtime":1610617835443,"results":"14","hashOfConfig":"15"},{"size":362,"mtime":499162500000,"results":"16","hashOfConfig":"15"},{"size":2211,"mtime":1609913204293,"results":"17","hashOfConfig":"15"},{"size":5321,"mtime":1610510910816,"results":"18","hashOfConfig":"15"},{"size":2742,"mtime":1610519196409,"results":"19","hashOfConfig":"15"},{"size":405,"mtime":1609915408569,"results":"20","hashOfConfig":"15"},{"size":2675,"mtime":1610519220676,"results":"21","hashOfConfig":"15"},{"size":459,"mtime":1610352110057,"results":"22","hashOfConfig":"15"},{"size":2199,"mtime":1610503781980,"results":"23","hashOfConfig":"15"},{"size":40560,"mtime":1611107357042,"results":"24","hashOfConfig":"15"},{"size":2110,"mtime":1610617422890,"results":"25","hashOfConfig":"15"},{"size":438,"mtime":1610615328660,"results":"26","hashOfConfig":"15"},{"size":2430,"mtime":1611103256785,"results":"27","hashOfConfig":"15"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30","usedDeprecatedRules":"31"},"1t9w6go",{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"38","usedDeprecatedRules":"31"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"51","messages":"52","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"53","usedDeprecatedRules":"31"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":12,"fixableErrorCount":0,"fixableWarningCount":0,"source":"58","usedDeprecatedRules":"31"},"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\index.js",["59"],"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 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\nimport axios from 'axios';\r\n\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 <Redirect path=\"/search/:search\" to=\"/search\" />\r\n <PrivateRoute path='/bookmark'><Bookmark/></PrivateRoute>\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",["60","61"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\pagination.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js",["62","63","64","65","66","67"],"import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Modal, Container, Row, Col, Button, Badge, Card, Accordion, Carousel } from 'react-bootstrap';\r\n\r\nfunction Place(props) {\r\n const [reviews, setReviews] = useState([])\r\n const getReview = () => {\r\n axios.get(`/api/review/${props.search.name}`)\r\n .then(res => {\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\r\n return (\r\n <Modal {...props}\r\n size=\"xl\"\r\n keyboard=\"true\"\r\n variant=\"backdrop.in\"\r\n // show={lgShow}\r\n // onHide={() => setLgShow(false)}\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.search.name}\r\n </Modal.Title>\r\n </Modal.Header>\r\n <Modal.Body className=\"show-grid\">\r\n <Container style={{ fontSize: '40px' }}>\r\n {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 </Row>\r\n )\r\n })}\r\n </Container>\r\n\r\n {/* <Accordion defaultActiveKey=\"0\">\r\n <Accordion.Toggle as={Button} variant=\"link\" eventKey=\"0\">\r\n <a className=\"mb-2\">다음의 블로그 보기</a>\r\n </Accordion.Toggle>\r\n <Accordion.Collapse eventKey=\"0\">\r\n <Card.Body><div>주도 전역을 지배하는 한라산은 남한에서 가장 높은 산으로 높이는 1,947.3m이다. 한라산이라는 이름은 산이 높아 산정에 서면 은하수를 잡아당길 수 있다는 뜻이며, 부악·원산·선산·두무악·영주산·부라산·혈망봉·여장군 등으로도 불려왔다.</div></Card.Body>\r\n </Accordion.Collapse>\r\n <Row>\r\n <Accordion.Toggle as={Button} variant=\"link\" eventKey=\"1\">\r\n <a className=\"mb-2\">네이버의 블로그 보기</a>\r\n </Accordion.Toggle>\r\n <Accordion.Collapse eventKey=\"1\">\r\n <Card.Body><div>한라산은 1966년 한라산 천연보호구역으로, 1970년 국립공원으로 지정되었다. 그리고 2002년에는 유네스코 생물권보전지역으로 지정되었으며 2007년에는 유네스코 세계자연유산으로 등재되었다. 2008년에는 물장오리오름 산정화구호 습지가 람사르 습지로 등록되어 보호 관리되고 있다</div></Card.Body>\r\n </Accordion.Collapse>\r\n </Row>\r\n <Row>\r\n <Accordion.Toggle as={Button} variant=\"link\" eventKey=\"2\">\r\n <a className=\"mb-2\">구글의 블로그 보기</a>\r\n </Accordion.Toggle>\r\n <Accordion.Collapse eventKey=\"2\">\r\n <Card.Body><div>한라산은 제주도에 있는 해발 1,947.06m, 면적 약 1,820km²의 화산으로, 제주도의 면적 대부분을 차지하고 있다. 정상에 백록담이라는 화산호가 있는데, 백록담이라는 이름은 흰 사슴이 물을 먹는 곳이라는 뜻에서 왔다고 전해진다.</div></Card.Body>\r\n </Accordion.Collapse>\r\n </Row>\r\n </Accordion>\r\n <Row style={{ color: 'white' }}>\r\n <a href=\"https://www.daum.net/\" className=\"mb-2\">다음</a><a href=\"https://www.naver.com/\" className=\"mb-2\">네이버</a><a href=\"https://www.google.com/\" className=\"mb-2\">구글</a>\r\n </Row>\r\n // </Container>\r\n <Carousel>\r\n <Carousel.Item interval={1000}>\r\n <h3>다음 블로그</h3>\r\n <div>주도 전역을 지배하는 한라산은 남한에서 가장 높은 산으로 높이는 1,947.3m이다. 한라산이라는 이름은 산이 높아 산정에 서면 은하수를 잡아당길 수 있다는 뜻이며, 부악·원산·선산·두무악·영주산·부라산·혈망봉·여장군 등으로도 불려왔다.</div>\r\n </Carousel.Item>\r\n <Carousel.Item interval={1000}>\r\n <h3>네이버 블로그</h3>\r\n <div>한라산은 1966년 한라산 천연보호구역으로, 1970년 국립공원으로 지정되었다. 그리고 2002년에는 유네스코 생물권보전지역으로 지정되었으며 2007년에는 유네스코 세계자연유산으로 등재되었다. 2008년에는 물장오리오름 산정화구호 습지가 람사르 습지로 등록되어 보호 관리되고 있다</div>\r\n </Carousel.Item>\r\n <Carousel.Item interval={1000}>\r\n <h3>구글 블로그</h3>\r\n <div>한라산은 제주도에 있는 해발 1,947.06m, 면적 약 1,820km²의 화산으로, 제주도의 면적 대부분을 차지하고 있다. 정상에 백록담이라는 화산호가 있는데, 백록담이라는 이름은 흰 사슴이 물을 먹는 곳이라는 뜻에서 왔다고 전해진다.</div>\r\n </Carousel.Item>\r\n </Carousel> */}\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",["68"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js",["69","70","71","72"],"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={{\r\n pathname: `/search/${search}`,\r\n state: { id: search },\r\n }} />;\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 }\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",["73","74","75","76","77","78","79","80","81","82","83","84"],"import React, { useState, useEffect } from 'react'\r\nimport { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar, ListGroup, Image, Table } from \"react-bootstrap\"\r\nimport axios from \"axios\"\r\nimport { Redirect } from 'react-router-dom'\r\n\r\nfunction Bookmark() {\r\n // function addFavorite() {\r\n // const title = document.title\r\n // const url = window.location.href\r\n // if (window.sidebar && window.sidebar.addPanel) {\r\n // window.sidebar.addPanel(title, url, \"\")\r\n // } else if (window.opera && window.print) {\r\n // const elem = document.createElement('a');\r\n // elem.setAttribute('href', url);\r\n // elem.setAttribute('title', title);\r\n // elem.setAttribute('rel', 'sidebar');\r\n // elem.click();\r\n // } else if (document.all) { //msie\r\n // window.external.AddFavorite(url, title);\r\n // } else {\r\n // alert(\"해당브라우저는 즐겨찾기 추가기능이 지원되지 않습니다.\\n\\n수동으로 즐겨찾기에 추가해주세요.\");\r\n // return true;\r\n // }\r\n // }\r\n // const [index, setIndex] = useState(1);\r\n // const [showSet, setShowSet] = useState([false, false, false, false]);\r\n const add_Page = [{\r\n title:'즐겨찾기1',\r\n url:'http://localhost:3000',\r\n }, {\r\n title:'즐겨찾기2',\r\n url:'https://www.naver.com/',\r\n }, {\r\n title:'즐겨찾기3',\r\n url:'https://www.youtube.com/watch?v=wo46N-LQK7o'\r\n }]\r\n // const addPlace = addFavorite(add_Page)\r\n \r\n\r\n return (\r\n <Container>\r\n <Navbar bg=\"primary\" variant=\"dark\">\r\n <Navbar.Brand href=\"/\">북마크</Navbar.Brand>\r\n <Nav className=\"mr-auto\">\r\n <Nav.Link href=\"/\">Home</Nav.Link>\r\n </Nav>\r\n {/* <Form inline>\r\n <FormControl type=\"text\" placeholder=\"Search\" className=\"mr-sm-2\" />\r\n <Button variant=\"outline-light\">Search</Button>\r\n </Form> */}\r\n </Navbar>\r\n <Form>\r\n <ListGroup>\r\n <ListGroup.Item action href=\"/\">북마크1</ListGroup.Item>\r\n <ListGroup.Item>북마크2</ListGroup.Item>\r\n </ListGroup>\r\n </Form>\r\n </Container>\r\n )\r\n}\r\n\r\nexport default Bookmark",{"ruleId":"85","severity":1,"message":"86","line":18,"column":8,"nodeType":"87","messageId":"88","endLine":18,"endColumn":13},{"ruleId":"89","replacedBy":"90"},{"ruleId":"91","replacedBy":"92"},{"ruleId":"85","severity":1,"message":"93","line":3,"column":33,"nodeType":"87","messageId":"88","endLine":3,"endColumn":36},{"ruleId":"85","severity":1,"message":"94","line":3,"column":46,"nodeType":"87","messageId":"88","endLine":3,"endColumn":51},{"ruleId":"85","severity":1,"message":"95","line":3,"column":53,"nodeType":"87","messageId":"88","endLine":3,"endColumn":57},{"ruleId":"85","severity":1,"message":"96","line":3,"column":59,"nodeType":"87","messageId":"88","endLine":3,"endColumn":68},{"ruleId":"85","severity":1,"message":"97","line":3,"column":70,"nodeType":"87","messageId":"88","endLine":3,"endColumn":78},{"ruleId":"98","severity":1,"message":"99","line":19,"column":6,"nodeType":"100","endLine":19,"endColumn":8,"suggestions":"101"},{"ruleId":null,"fatal":true,"severity":2,"message":"102","line":542,"column":1},{"ruleId":"85","severity":1,"message":"103","line":1,"column":17,"nodeType":"87","messageId":"88","endLine":1,"endColumn":26},{"ruleId":"85","severity":1,"message":"104","line":2,"column":10,"nodeType":"87","messageId":"88","endLine":2,"endColumn":14},{"ruleId":"85","severity":1,"message":"105","line":4,"column":64,"nodeType":"87","messageId":"88","endLine":4,"endColumn":75},{"ruleId":"85","severity":1,"message":"106","line":4,"column":77,"nodeType":"87","messageId":"88","endLine":4,"endColumn":83},{"ruleId":"85","severity":1,"message":"107","line":1,"column":17,"nodeType":"87","messageId":"88","endLine":1,"endColumn":25},{"ruleId":"85","severity":1,"message":"103","line":1,"column":27,"nodeType":"87","messageId":"88","endLine":1,"endColumn":36},{"ruleId":"85","severity":1,"message":"108","line":2,"column":10,"nodeType":"87","messageId":"88","endLine":2,"endColumn":15},{"ruleId":"85","severity":1,"message":"93","line":2,"column":17,"nodeType":"87","messageId":"88","endLine":2,"endColumn":20},{"ruleId":"85","severity":1,"message":"95","line":2,"column":22,"nodeType":"87","messageId":"88","endLine":2,"endColumn":26},{"ruleId":"85","severity":1,"message":"109","line":2,"column":45,"nodeType":"87","messageId":"88","endLine":2,"endColumn":48},{"ruleId":"85","severity":1,"message":"110","line":2,"column":50,"nodeType":"87","messageId":"88","endLine":2,"endColumn":56},{"ruleId":"85","severity":1,"message":"111","line":2,"column":82,"nodeType":"87","messageId":"88","endLine":2,"endColumn":87},{"ruleId":"85","severity":1,"message":"112","line":2,"column":89,"nodeType":"87","messageId":"88","endLine":2,"endColumn":94},{"ruleId":"85","severity":1,"message":"86","line":3,"column":8,"nodeType":"87","messageId":"88","endLine":3,"endColumn":13},{"ruleId":"85","severity":1,"message":"113","line":4,"column":10,"nodeType":"87","messageId":"88","endLine":4,"endColumn":18},{"ruleId":"85","severity":1,"message":"114","line":27,"column":11,"nodeType":"87","messageId":"88","endLine":27,"endColumn":19},"no-unused-vars","'axios' is defined but never used.","Identifier","unusedVar","no-native-reassign",["115"],"no-negated-in-lhs",["116"],"'Col' is defined but never used.","'Badge' is defined but never used.","'Card' is defined but never used.","'Accordion' is defined but never used.","'Carousel' is defined but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getReview'. Either include it or remove the dependency array.","ArrayExpression",["117"],"Parsing error: 'import' and 'export' may only appear at the top level\n\n\u001b[0m \u001b[90m 540 | \u001b[39m}\u001b[0m\n\u001b[0m \u001b[90m 541 | \u001b[39m\u001b[0m\n\u001b[0m\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 542 | \u001b[39m\u001b[36mexport\u001b[39m \u001b[36mdefault\u001b[39m \u001b[33mSearch\u001b[39m\u001b[0m\n\u001b[0m \u001b[90m | \u001b[39m\u001b[31m\u001b[1m^\u001b[22m\u001b[39m\u001b[0m\n\u001b[0m \u001b[90m 543 | \u001b[39m\u001b[0m","'useEffect' is defined but never used.","'Link' is defined but never used.","'FormControl' is defined but never used.","'Navbar' is defined but never used.","'useState' is defined but never used.","'Alert' is defined but never used.","'Row' is defined but never used.","'Button' is defined but never used.","'Image' is defined but never used.","'Table' is defined but never used.","'Redirect' is defined but never used.","'add_Page' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"118","fix":"119"},"Update the dependencies array to be: [getReview]",{"range":"120","text":"121"},[511,513],"[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\\pagination.js":"3","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js":"4","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Login.js":"5","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\catchErrors.js":"6","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Signup.js":"7","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\utils\\auth.js":"8","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js":"9","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Search.js":"10","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\App.js":"11","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\PrivateRoute.js":"12","C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Bookmark.js":"13"},{"size":1278,"mtime":1611121605705,"results":"14","hashOfConfig":"15"},{"size":362,"mtime":499162500000,"results":"16","hashOfConfig":"15"},{"size":2211,"mtime":1609913204293,"results":"17","hashOfConfig":"15"},{"size":5415,"mtime":1611127383900,"results":"18","hashOfConfig":"15"},{"size":2742,"mtime":1610519196409,"results":"19","hashOfConfig":"15"},{"size":405,"mtime":1609915408569,"results":"20","hashOfConfig":"15"},{"size":2675,"mtime":1610519220676,"results":"21","hashOfConfig":"15"},{"size":459,"mtime":1610352110057,"results":"22","hashOfConfig":"15"},{"size":2199,"mtime":1610503781980,"results":"23","hashOfConfig":"15"},{"size":12035,"mtime":1611127381906,"results":"24","hashOfConfig":"15"},{"size":2110,"mtime":1610617422890,"results":"25","hashOfConfig":"15"},{"size":438,"mtime":1610615328660,"results":"26","hashOfConfig":"15"},{"size":2304,"mtime":1611111672945,"results":"27","hashOfConfig":"15"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30","usedDeprecatedRules":"31"},"1t9w6go",{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":8,"fixableErrorCount":0,"fixableWarningCount":0,"source":"38"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"51","messages":"52","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"53","usedDeprecatedRules":"31"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"31"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":12,"fixableErrorCount":0,"fixableWarningCount":0,"source":"58","usedDeprecatedRules":"31"},"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\index.js",["59"],"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 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\nimport axios from 'axios';\r\n\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 <Redirect path=\"/search/:search\" to=\"/search\" />\r\n <PrivateRoute path='/bookmark'><Bookmark/></PrivateRoute>\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",["60","61"],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\pagination.js",[],"C:\\Users\\hello\\Desktop\\project\\search-page\\client\\src\\Components\\Place.js",["62","63","64","65","66","67","68","69"],"import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Modal, Container, Row, Col, Button, Badge, Card, Accordion, Carousel } from 'react-bootstrap';\r\n\r\nfunction Place(props) {\r\n const [reviews, setReviews] = useState([])\r\n const getReview = () => {\r\n axios.get(`/api/review/${props.search.name}`)\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 // show={lgShow}\r\n // onHide={() => setLgShow(false)}\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.search.name}\r\n </Modal.Title>\r\n </Modal.Header>\r\n <Modal.Body className=\"show-grid\">\r\n <Container style={{ fontSize: '40px' }}>\r\n {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 </Container>\r\n\r\n {/* <Accordion defaultActiveKey=\"0\">\r\n <Accordion.Toggle as={Button} variant=\"link\" eventKey=\"0\">\r\n <a className=\"mb-2\">다음의 블로그 보기</a>\r\n </Accordion.Toggle>\r\n <Accordion.Collapse eventKey=\"0\">\r\n <Card.Body><div>주도 전역을 지배하는 한라산은 남한에서 가장 높은 산으로 높이는 1,947.3m이다. 한라산이라는 이름은 산이 높아 산정에 서면 은하수를 잡아당길 수 있다는 뜻이며, 부악·원산·선산·두무악·영주산·부라산·혈망봉·여장군 등으로도 불려왔다.</div></Card.Body>\r\n </Accordion.Collapse>\r\n <Row>\r\n <Accordion.Toggle as={Button} variant=\"link\" eventKey=\"1\">\r\n <a className=\"mb-2\">네이버의 블로그 보기</a>\r\n </Accordion.Toggle>\r\n <Accordion.Collapse eventKey=\"1\">\r\n <Card.Body><div>한라산은 1966년 한라산 천연보호구역으로, 1970년 국립공원으로 지정되었다. 그리고 2002년에는 유네스코 생물권보전지역으로 지정되었으며 2007년에는 유네스코 세계자연유산으로 등재되었다. 2008년에는 물장오리오름 산정화구호 습지가 람사르 습지로 등록되어 보호 관리되고 있다</div></Card.Body>\r\n </Accordion.Collapse>\r\n </Row>\r\n <Row>\r\n <Accordion.Toggle as={Button} variant=\"link\" eventKey=\"2\">\r\n <a className=\"mb-2\">구글의 블로그 보기</a>\r\n </Accordion.Toggle>\r\n <Accordion.Collapse eventKey=\"2\">\r\n <Card.Body><div>한라산은 제주도에 있는 해발 1,947.06m, 면적 약 1,820km²의 화산으로, 제주도의 면적 대부분을 차지하고 있다. 정상에 백록담이라는 화산호가 있는데, 백록담이라는 이름은 흰 사슴이 물을 먹는 곳이라는 뜻에서 왔다고 전해진다.</div></Card.Body>\r\n </Accordion.Collapse>\r\n </Row>\r\n </Accordion>\r\n <Row style={{ color: 'white' }}>\r\n <a href=\"https://www.daum.net/\" className=\"mb-2\">다음</a><a href=\"https://www.naver.com/\" className=\"mb-2\">네이버</a><a href=\"https://www.google.com/\" className=\"mb-2\">구글</a>\r\n </Row>\r\n // </Container>\r\n <Carousel>\r\n <Carousel.Item interval={1000}>\r\n <h3>다음 블로그</h3>\r\n <div>주도 전역을 지배하는 한라산은 남한에서 가장 높은 산으로 높이는 1,947.3m이다. 한라산이라는 이름은 산이 높아 산정에 서면 은하수를 잡아당길 수 있다는 뜻이며, 부악·원산·선산·두무악·영주산·부라산·혈망봉·여장군 등으로도 불려왔다.</div>\r\n </Carousel.Item>\r\n <Carousel.Item interval={1000}>\r\n <h3>네이버 블로그</h3>\r\n <div>한라산은 1966년 한라산 천연보호구역으로, 1970년 국립공원으로 지정되었다. 그리고 2002년에는 유네스코 생물권보전지역으로 지정되었으며 2007년에는 유네스코 세계자연유산으로 등재되었다. 2008년에는 물장오리오름 산정화구호 습지가 람사르 습지로 등록되어 보호 관리되고 있다</div>\r\n </Carousel.Item>\r\n <Carousel.Item interval={1000}>\r\n <h3>구글 블로그</h3>\r\n <div>한라산은 제주도에 있는 해발 1,947.06m, 면적 약 1,820km²의 화산으로, 제주도의 면적 대부분을 차지하고 있다. 정상에 백록담이라는 화산호가 있는데, 백록담이라는 이름은 흰 사슴이 물을 먹는 곳이라는 뜻에서 왔다고 전해진다.</div>\r\n </Carousel.Item>\r\n </Carousel> */}\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",["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={{\r\n pathname: `/search/${search}`,\r\n state: { id: search },\r\n }} />;\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 }\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"],"import React, { useState, useEffect } from 'react'\r\nimport { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar, ListGroup, Image, Table } from \"react-bootstrap\"\r\nimport axios from \"axios\"\r\nimport { Redirect } from 'react-router-dom'\r\n\r\nfunction Bookmark() {\r\n // function addFavorite() {\r\n // const title = document.title\r\n // const url = window.location.href\r\n // if (window.sidebar && window.sidebar.addPanel) {\r\n // window.sidebar.addPanel(title, url, \"\")\r\n // } else if (window.opera && window.print) {\r\n // const elem = document.createElement('a');\r\n // elem.setAttribute('href', url);\r\n // elem.setAttribute('title', title);\r\n // elem.setAttribute('rel', 'sidebar');\r\n // elem.click();\r\n // } else if (document.all) { //msie\r\n // window.external.AddFavorite(url, title);\r\n // } else {\r\n // alert(\"해당브라우저는 즐겨찾기 추가기능이 지원되지 않습니다.\\n\\n수동으로 즐겨찾기에 추가해주세요.\");\r\n // return true;\r\n // }\r\n // }\r\n const add_Page = [{\r\n title:'즐겨찾기1',\r\n url:'http://localhost:3000',\r\n }, {\r\n title:'즐겨찾기2',\r\n url:'https://www.naver.com/',\r\n }, {\r\n title:'즐겨찾기3',\r\n url:'https://www.youtube.com/watch?v=wo46N-LQK7o'\r\n }]\r\n // const addPlace = addFavorite(add_Page)\r\n \r\n\r\n return (\r\n <Container>\r\n <Navbar bg=\"primary\" variant=\"dark\">\r\n <Navbar.Brand href=\"/\">북마크</Navbar.Brand>\r\n <Nav className=\"mr-auto\">\r\n <Nav.Link href=\"/\">Home</Nav.Link>\r\n </Nav>\r\n {/* <Form inline>\r\n <FormControl type=\"text\" placeholder=\"Search\" className=\"mr-sm-2\" />\r\n <Button variant=\"outline-light\">Search</Button>\r\n </Form> */}\r\n </Navbar>\r\n <Form>\r\n <ListGroup>\r\n <ListGroup.Item action href=\"\">북마크1</ListGroup.Item>\r\n <ListGroup.Item>북마크2</ListGroup.Item>\r\n </ListGroup>\r\n </Form>\r\n </Container>\r\n )\r\n}\r\n\r\nexport default Bookmark",{"ruleId":"89","severity":1,"message":"90","line":18,"column":8,"nodeType":"91","messageId":"92","endLine":18,"endColumn":13},{"ruleId":"93","replacedBy":"94"},{"ruleId":"95","replacedBy":"96"},{"ruleId":"89","severity":1,"message":"90","line":1,"column":8,"nodeType":"91","messageId":"92","endLine":1,"endColumn":13},{"ruleId":"89","severity":1,"message":"97","line":2,"column":17,"nodeType":"91","messageId":"92","endLine":2,"endColumn":26},{"ruleId":"89","severity":1,"message":"98","line":2,"column":28,"nodeType":"91","messageId":"92","endLine":2,"endColumn":36},{"ruleId":"89","severity":1,"message":"99","line":3,"column":33,"nodeType":"91","messageId":"92","endLine":3,"endColumn":36},{"ruleId":"89","severity":1,"message":"100","line":3,"column":46,"nodeType":"91","messageId":"92","endLine":3,"endColumn":51},{"ruleId":"89","severity":1,"message":"101","line":3,"column":53,"nodeType":"91","messageId":"92","endLine":3,"endColumn":57},{"ruleId":"89","severity":1,"message":"102","line":3,"column":59,"nodeType":"91","messageId":"92","endLine":3,"endColumn":68},{"ruleId":"89","severity":1,"message":"103","line":3,"column":70,"nodeType":"91","messageId":"92","endLine":3,"endColumn":78},{"ruleId":"89","severity":1,"message":"90","line":8,"column":8,"nodeType":"91","messageId":"92","endLine":8,"endColumn":13},{"ruleId":"89","severity":1,"message":"104","line":16,"column":12,"nodeType":"91","messageId":"92","endLine":16,"endColumn":18},{"ruleId":"105","severity":1,"message":"106","line":90,"column":35,"nodeType":"107","endLine":90,"endColumn":76},{"ruleId":"89","severity":1,"message":"97","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":26},{"ruleId":"89","severity":1,"message":"108","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":14},{"ruleId":"89","severity":1,"message":"109","line":4,"column":64,"nodeType":"91","messageId":"92","endLine":4,"endColumn":75},{"ruleId":"89","severity":1,"message":"110","line":4,"column":77,"nodeType":"91","messageId":"92","endLine":4,"endColumn":83},{"ruleId":"89","severity":1,"message":"98","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"97","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"111","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":15},{"ruleId":"89","severity":1,"message":"99","line":2,"column":17,"nodeType":"91","messageId":"92","endLine":2,"endColumn":20},{"ruleId":"89","severity":1,"message":"101","line":2,"column":22,"nodeType":"91","messageId":"92","endLine":2,"endColumn":26},{"ruleId":"89","severity":1,"message":"112","line":2,"column":45,"nodeType":"91","messageId":"92","endLine":2,"endColumn":48},{"ruleId":"89","severity":1,"message":"113","line":2,"column":50,"nodeType":"91","messageId":"92","endLine":2,"endColumn":56},{"ruleId":"89","severity":1,"message":"114","line":2,"column":82,"nodeType":"91","messageId":"92","endLine":2,"endColumn":87},{"ruleId":"89","severity":1,"message":"115","line":2,"column":89,"nodeType":"91","messageId":"92","endLine":2,"endColumn":94},{"ruleId":"89","severity":1,"message":"90","line":3,"column":8,"nodeType":"91","messageId":"92","endLine":3,"endColumn":13},{"ruleId":"89","severity":1,"message":"116","line":4,"column":10,"nodeType":"91","messageId":"92","endLine":4,"endColumn":18},{"ruleId":"89","severity":1,"message":"117","line":25,"column":11,"nodeType":"91","messageId":"92","endLine":25,"endColumn":19},"no-unused-vars","'axios' is defined but never used.","Identifier","unusedVar","no-native-reassign",["118"],"no-negated-in-lhs",["119"],"'useEffect' is defined but never used.","'useState' is defined but never used.","'Col' is defined but never used.","'Badge' is defined but never used.","'Card' is defined but never used.","'Accordion' is defined but never used.","'Carousel' is defined but never used.","'mobile' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'Link' is defined but never used.","'FormControl' is defined but never used.","'Navbar' is defined but never used.","'Alert' is defined but never used.","'Row' is defined but never used.","'Button' is defined but never used.","'Image' is defined but never used.","'Table' is defined but never used.","'Redirect' is defined but never used.","'add_Page' is assigned a value but never used.","no-global-assign","no-unsafe-negation"]
\ No newline at end of file \ No newline at end of file
...@@ -22,8 +22,6 @@ function Bookmark() { ...@@ -22,8 +22,6 @@ function Bookmark() {
// return true; // return true;
// } // }
// } // }
// const [index, setIndex] = useState(1);
// const [showSet, setShowSet] = useState([false, false, false, false]);
const add_Page = [{ const add_Page = [{
title:'즐겨찾기1', title:'즐겨찾기1',
url:'http://localhost:3000', url:'http://localhost:3000',
...@@ -51,7 +49,7 @@ function Bookmark() { ...@@ -51,7 +49,7 @@ function Bookmark() {
</Navbar> </Navbar>
<Form> <Form>
<ListGroup> <ListGroup>
<ListGroup.Item action href="/">북마크1</ListGroup.Item> <ListGroup.Item action href="">북마크1</ListGroup.Item>
<ListGroup.Item>북마크2</ListGroup.Item> <ListGroup.Item>북마크2</ListGroup.Item>
</ListGroup> </ListGroup>
</Form> </Form>
......
...@@ -2,10 +2,10 @@ import React, { useState, useEffect } from 'react'; ...@@ -2,10 +2,10 @@ 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, Pagination, Nav, Navbar } from 'react-bootstrap'; import { Container, Form, Row, Col, Card, Image, InputGroup, FormControl, Button, Modal } from 'react-bootstrap';
import Paginations from './pagination.js'; import Paginations from './pagination.js';
import { addFavorite } from './Bookmark.js' import * as Icon from 'react-bootstrap-icons';
import axios from "axios";
function Search(props) { function Search(props) {
const endPage = 10; const endPage = 10;
...@@ -14,6 +14,10 @@ function Search(props) { ...@@ -14,6 +14,10 @@ function Search(props) {
const [showSet, setShowSet] = useState([false, false, false, false]); const [showSet, setShowSet] = useState([false, false, false, false]);
const [search, setSearch] = useState(props.location.state.id); const [search, setSearch] = useState(props.location.state.id);
const [mobile, setMobile] = useState(); const [mobile, setMobile] = useState();
const [show, setShow] = useState(false);
const handleClose = () => setShow(false);
const handleShow = () => setShow(true);
useEffect(() => { useEffect(() => {
if (window.innerWidth < 960) { if (window.innerWidth < 960) {
...@@ -57,6 +61,9 @@ function Search(props) { ...@@ -57,6 +61,9 @@ function Search(props) {
setIndex(num); setIndex(num);
} }
// async function bookmarkSave() {
// await axios.put('/api/users', {userId:userId, bookmarkId:bookmarkId})
// }
const handleChange = (e) => { const handleChange = (e) => {
setSearch(e.target.value); setSearch(e.target.value);
...@@ -106,31 +113,34 @@ function Search(props) { ...@@ -106,31 +113,34 @@ function Search(props) {
return ( return (
<Col key={index} md={6} > <Col key={index} md={6} >
<Card align="center" border="info" style={{ margin: "3%" }}> <Card align="center" border="info" style={{ margin: "3%" }}>
<Card.Title style={{ margin: "3%", fontSize: '200%', fontWeight: 'bold' }}>{place.name}<Button onClick={handleShow}> <Modal <Button variant="outline-info" style={{ marginLeft: "60vh" }} onClick={handleShow}><Icon.BookmarkStar size={30} /> <Modal
show={show} show={show}
onHide={handleClose} onHide={handleClose}
backdrop="static" backdrop="static"
keyboard={false} keyboard={false}
><Form> >
<Modal.Header closeButton>
<Modal.Title id="contained-modal-title-vcenter" style={{ fontSize: '30px' }}>북마크 추가됨
</Modal.Title>
</Modal.Header><Form>
<Form.Group controlId="formBasicEmail"> <Form.Group controlId="formBasicEmail">
<Form.Label>이름</Form.Label> <Form.Label style={{ fontSize: '20px' }}>이름</Form.Label>
<Form.Control type="email" placeholder="Enter email" /> <Form.Control type="email" />
<Form.Text className="text-muted"> <Form.Text className="text-muted">
We'll never share your email with anyone else.
</Form.Text> </Form.Text>
</Form.Group> </Form.Group>
<Form.Group controlId="formBasicPassword"> {/* <Form.Group controlId="formBasicPassword">
<Form.Label>폴더</Form.Label> <Form.Label style={{ fontSize: '20px' }}>폴더</Form.Label>
<Form.Control type="password" placeholder="Password" /> <Form.Control type="password" placeholder="Password" />
</Form.Group> </Form.Group> */}
<Form.Group controlId="formBasicCheckbox"> <Modal.Footer>
<Form.Check type="checkbox" label="Check me out" /> <Button variant="primary" type="submit">저장</Button>
</Form.Group> <Button onClick={props.onHide}>삭제</Button>
<Button variant="primary" type="submit"> </Modal.Footer>
Submit </Form></Modal></Button>
</Button> <Card.Title style={{ margin: "3%", fontSize: '200%', fontWeight: 'bold' }}>{place.name}
</Form></Modal></Button></Card.Title> </Card.Title>
<Card.Img variant="top" style={{ padding: "5%", width: "100%", height: "340px" }} src={place.img} /> <Card.Img variant="top" style={{ padding: "5%", width: "100%", height: "340px" }} src={place.img} />
<Card.Body > <Card.Body >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height: "80px" }} > <Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height: "80px" }} >
...@@ -147,8 +157,8 @@ function Search(props) { ...@@ -147,8 +157,8 @@ function Search(props) {
) )
})} })}
</Row> </Row>
{ console.log(showSet) } { console.log(showSet)}
{/* show가 전부 true로 바뀌어서 전부 다 보이게 되는 것이다. */ } {/* show가 전부 true로 바뀌어서 전부 다 보이게 되는 것이다. */}
<Row className="mt-2 d-flex justify-content-center"> <Row className="mt-2 d-flex justify-content-center">
<Paginations index={index} endPage={endPage} handlePage={handlePage}></Paginations> <Paginations index={index} endPage={endPage} handlePage={handlePage}></Paginations>
</Row> </Row>
......
...@@ -164,6 +164,11 @@ ...@@ -164,6 +164,11 @@
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
}, },
"bootstrap-icons": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.3.0.tgz",
"integrity": "sha512-w6zQ93p626zmPDqDtET7VdB9EkoDtfmCBV53hunjntoCke6X5LafXf6TxPAP+ImjRAhhxAyA/sjzQnHBY0uoiQ=="
},
"boxen": { "boxen": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
...@@ -908,6 +913,11 @@ ...@@ -908,6 +913,11 @@
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
}, },
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"json-buffer": { "json-buffer": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
...@@ -1012,6 +1022,14 @@ ...@@ -1012,6 +1022,14 @@
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
}, },
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"lowercase-keys": { "lowercase-keys": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
...@@ -1338,6 +1356,16 @@ ...@@ -1338,6 +1356,16 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
}, },
"prop-types": {
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"requires": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
}
},
"proxy-addr": { "proxy-addr": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
...@@ -1401,6 +1429,19 @@ ...@@ -1401,6 +1429,19 @@
"strip-json-comments": "~2.0.1" "strip-json-comments": "~2.0.1"
} }
}, },
"react-bootstrap-icons": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/react-bootstrap-icons/-/react-bootstrap-icons-1.2.3.tgz",
"integrity": "sha512-VPQFuFMVwsK93FTbvE/8InUbX5irc2VlQbCOiMvj80oei6+xek0Q5sOpHPdgVRUn2BeiCAAc9OEOgrebZLWLMA==",
"requires": {
"prop-types": "^15.7.2"
}
},
"react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"readable-stream": { "readable-stream": {
"version": "2.3.7", "version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
......
...@@ -7,12 +7,14 @@ ...@@ -7,12 +7,14 @@
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"bootstrap-icons": "^1.3.0",
"cheerio": "^1.0.0-rc.5", "cheerio": "^1.0.0-rc.5",
"express": "^4.17.1", "express": "^4.17.1",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"mongoose": "^5.11.11", "mongoose": "^5.11.11",
"multer": "^1.4.2", "multer": "^1.4.2",
"nodemon": "^2.0.7", "nodemon": "^2.0.7",
"react-bootstrap-icons": "^1.2.3",
"validator": "^13.5.2" "validator": "^13.5.2"
}, },
"devDependencies": {}, "devDependencies": {},
......
import Review from '../models/Review.js'
import cheerio, { html } from "cheerio";
import jschardet from 'jschardet'
import iconv from 'iconv'
import fs from 'fs'
import axios from 'axios';
import { nextTick } from 'process';
const Iconv = iconv.Iconv
const search = async (req, res, next) => {
// const url = "https://www.google.com/search?q=" + encodeURI(req.params.search) + "+site%3Atistory.com&page_no=1"
const url = "https://www.google.com/search?q=" + encodeURI("한라산") + "+site%3Atistory.com&page_no=1"
let reviews = []
try {
axios.get(url)
// .then(anyToUtf8)
.then((html) => {
const $1 = cheerio.load(html.data);
$1('.kCrYT').each(function (i) {
const searchParams = new URLSearchParams($1(this).find('a').attr('href'));
const title = $1(this).find('h3').text()
const link = searchParams.get("/url?q")
const summary = $1(this).find('.s3v9rd').find('.s3v9rd').text()
const response = axios.get(link)
console.log(response)
// const $2 = cheerio.load(toString(response.data));
let content = "없음"
// if ($2('.tt_article_useless_p_margin').text()) {
// content = $2('.tt_article_useless_p_margin').text()
// }
if (title) {
reviews[i] = { title: title, link: link, content: content }
} else if (summary) {
reviews[i - 1] = { ...reviews[i - 1], summary: summary }
reviews = reviews.filter(e => e)
}
// reviews.forEach((review, i) => {
// axios.get(review.link)
// .then((html) => {
// const $2 = cheerio.load(html.data);
// let content = '없음'
// if ($2('.tt_article_useless_p_margin').text()) {
// content = $2('.tt_article_useless_p_margin').text()
// }
// // fs.writeFileSync(`tistory${i}.txt`, '\ufeff' + html.data, { encoding: 'utf8' });
// // console.log(`${i}번째, ${review.content}`)
// review["content"] = content
// // console.log(review)
// })
// })
// // const review = new Review(reviews).save()
})
res.send(reviews)
})
} catch (error) {
console.log(error)
res.status(500).send('리뷰 저장 에러')
}
}
const getReview = (link) => {
let content = '없음'
const res = axios.get(link)
console.log(res)
// const $2 = cheerio.load(res.data);
// if ($2('.tt_article_useless_p_margin').text()) {
// content = $2('.tt_article_useless_p_margin').text()
// }
console.log(content)
return content
}
export default { search, getReview }
\ No newline at end of file
import Review from '../models/Review.js'
import cheerio, { html } from "cheerio";
import jschardet from 'jschardet'
import iconv from 'iconv'
import fs from 'fs'
import axios from 'axios';
import { nextTick } from 'process';
import { response } from 'express';
const Iconv = iconv.Iconv
const search = async (req, res, next) => {
const url = "https://www.google.com/search?q=" + encodeURI(req.params.search) + "+site%3Atistory.com&page_no=1"
let reviews = []
try {
axios.get(url)
.then((response1) => {
const $1 = cheerio.load(response1.data);
$1('.kCrYT').each(function (i) {
const searchParams = new URLSearchParams($1(this).find('a').attr('href'));
const title = $1(this).find('h3').text()
const link = searchParams.get("/url?q")
const summary = $1(this).find('.s3v9rd').find('.s3v9rd').text()
if (title) {
reviews[i] = { title: title, link: link, }
} else if (summary) {
reviews[i - 1] = { ...reviews[i - 1], summary: summary }
reviews = reviews.filter(e => e)
}
// const review = new Review(reviews).save()
})
res.send(reviews)
})
} catch (error) {
// reviews.forEach((review) => {
// axios.get(review.link)
// .then((response2) => {
// const $2 = cheerio.load(response2.data);
// let content = ''
// if ($2('.tt_article_useless_p_margin').text()) {
// content = $2('.tt_article_useless_p_margin').text()
// }
// review = { content: content }
// console.log("dkssud")
// })
// console.log("dkssud")
// })
// console.log(content)
res.status(500).send(error)
}
}
const getReview = async (link) => {
let content = '없음'
const res = await axios.get(link)
const $2 = cheerio.load(res.data);
if ($2('.tt_article_useless_p_margin').text()) {
content = $2('.tt_article_useless_p_margin').text()
}
console.log(content, "getReiview")
return content
}
export default { search, getReview }
\ No newline at end of file
...@@ -6,53 +6,6 @@ import cheerio from "cheerio"; ...@@ -6,53 +6,6 @@ import cheerio from "cheerio";
import axios from 'axios'; import axios from 'axios';
// const Iconv = iconv.Iconv // const Iconv = iconv.Iconv
// const search = async (req, res) => {
// const url = "https://www.google.com/search?q=" + encodeURI(req.params.search) + "+site%3Atistory.com&page_no=1"
// const editUrl = /(http(s)?:\/\/)([a-z0-9\w]+\.*)+[a-z0-9]{2,4}/gi
// axios.get(url)
// // .then(anyToUtf8)
// .then((html) => {
// // fs.writeFileSync("googlez.txt", '\ufeff' + html, { encoding: 'utf8' });
// let $1 = cheerio.load(html.data);
// let reviews = []
// $1('.kCrYT').each(function (i) {
// let link = ""
// if ($1(this).find('a').attr('href')) {
// link = ($1(this).find('a').attr('href')).match(editUrl)
// }
// reviews[i] = {
// title: $1(this).find('h3').text(),
// link: link,
// summary: $1(this).find('.s3v9rd').text(),
// }
// })
// // reviews.forEach((review, i) => {
// // axios.get(review.link)
// // .then((html) => {
// // let $2 = cheerio.load(html.data);
// // $2('').each(function(i){
// // review.content($2(this).find(''.text()))
// // })
// // })
// // })
// console.log(reviews)
// res.send(reviews)
// })
// // function anyToUtf8(str) {
// // const { encoding } = jschardet.detect(str); // 웹페이지 문서의 인코딩 타입을 확인
// // const iconv = new Iconv(encoding, "utf-8//translit//ignore"); // euc-kr 인코딩변환
// // return iconv.convert(str).toString();
// // }
// // try {
// // const newPlace = await new Place({
// // name: req.params.search,
// // address,
// // img,
// // })
// // }
const search = async (req, res, next) => { const search = async (req, res, next) => {
try { try {
let reviews = [] let reviews = []
......
import mongoose, { isValidObjectId } from "mongoose"; import mongoose, { isValidObjectId } from "mongoose";
const { String } = mongoose.Schema.Types const { String } = mongoose.Schema.Types
const { Array } = mongoose.Schema.Types
const UserSchema = new mongoose.Schema({ const UserSchema = new mongoose.Schema({
name: { name: {
...@@ -23,9 +24,10 @@ const UserSchema = new mongoose.Schema({ ...@@ -23,9 +24,10 @@ const UserSchema = new mongoose.Schema({
default: 'user', default: 'user',
enum: ['user', 'admin', 'root'] enum: ['user', 'admin', 'root']
}, },
// avatarUrl: { bookmark: {
// type: type: Array,
// }, required: true,
}
}, { }, {
timestamps: true timestamps: true
}) })
......
...@@ -6,10 +6,6 @@ const router = express.Router() ...@@ -6,10 +6,6 @@ const router = express.Router()
router.route('/api/users/signup') router.route('/api/users/signup')
.post(userCtrl.signup) .post(userCtrl.signup)
router.route('/api/users/profile/:userId')
.get(userCtrl.getProfile)
.put(userCtrl.profileUpload, userCtrl.update)
router.param('userId', userCtrl.userById) router.param('userId', userCtrl.userById)
export default router export default router
\ No newline at end of file
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