[{"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js":"1","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js":"2","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Place.js":"3","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js":"4","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js":"5","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js":"6"},{"size":939,"mtime":1611497444385,"results":"7","hashOfConfig":"8"},{"size":375,"mtime":1611254909401,"results":"9","hashOfConfig":"8"},{"size":1650,"mtime":1611504929008,"results":"10","hashOfConfig":"8"},{"size":3245,"mtime":1611711886687,"results":"11","hashOfConfig":"8"},{"size":7976,"mtime":1611712024750,"results":"12","hashOfConfig":"8"},{"size":1474,"mtime":1611504101870,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"16"},"13y9yvi",{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"21"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":0,"source":"26"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",["29"],"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 './Pages/App';\r\nimport Search from './Pages/Search';\r\nimport axios from 'axios';\r\nimport reportWebVitals from './reportWebVitals';\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 \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\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","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Place.js",["30","31"],"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 \r\n \r\n \r\n {props.index + 1}. {props.place.name}\r\n \r\n \r\n \r\n \r\n {Array.isArray(reviews) ? reviews.map((review, index) => {\r\n return (\r\n \r\n {review.title}\r\n
{review.summary}
\r\n
{review.content}
\r\n
\r\n )\r\n })\r\n : \"리뷰가 없습니다.\"}\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Place;\r\n","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js",["32","33","34","35","36","37","38"],"import React, { useState, useEffect } from 'react';\r\nimport { Link, Redirect } from 'react-router-dom';\r\nimport ohuh from '../ohuh-sm.PNG';\r\nimport Place from '../Components/Place';\r\nimport { Container, Form, Row, Col, Card, Image, InputGroup, FormControl, Button } from 'react-bootstrap';\r\nimport Paginations from '../Components/Paginations';\r\nimport axios from 'axios';\r\nimport queryString from 'query-string'\r\n\r\nfunction Search(props) {\r\n\r\n const [state, setState] = useState(false);\r\n const [index, setIndex] = useState(1);\r\n const [showSet, setShowSet] = useState([false, false, false, false]);\r\n const [search, setSearch] = useState(queryString.parse(props.location.search).keyword);\r\n const [mobile, setMobile] = useState();\r\n const [association, setAssociation] = useState([{ name: \" \", address: \" \", img: \" \" }])\r\n const [pagePlace, setPagePlace] = useState([{ name: \" \", address: \" \", img: \" \" }, { name: \" \", address: \" \", img: \" \" }])\r\n const [endPage, setEndPage] = useState(1)\r\n\r\n\r\n\r\n const getAssociation = () => {\r\n axios.get(`/api/search/association?keyword=${search}`)\r\n .then(res => {\r\n console.log(\"Associations = \", res.data)\r\n setAssociation(res.data)\r\n })\r\n .catch(err => {\r\n console.log(\"search.associations 에러 발생\", err)\r\n })\r\n }\r\n\r\n\r\n\r\n useEffect(() => {\r\n getAssociation()\r\n if (window.innerWidth < 960) {\r\n setMobile(true)\r\n } else {\r\n setMobile(false)\r\n }\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (association.length < 3) {\r\n setPagePlace(paginate(association, index, association.length))\r\n }\r\n else {\r\n setPagePlace(paginate(association, index, 4))\r\n }\r\n console.log(\"뿌릴 data1\", pagePlace)\r\n setEndPage(Math.floor((association.length / 4)))\r\n console.log(\"7489309484839\",endPage)\r\n\r\n }, [association, index])\r\n\r\n useEffect(() => {\r\n getAssociation()\r\n if (state) {\r\n props.history.push('/search?keyword=' + search)\r\n setState(false)\r\n console.log(\"search야\", search)\r\n }\r\n\r\n }, [state])\r\n\r\n\r\n const places = [{\r\n name: \"한라산\",\r\n address: \"제주 서귀포시 토평동 산15-1\",\r\n img: \"https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg/269px-KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg?size=200x200\",\r\n }, {\r\n name: \"성산일출봉(sungsan)\",\r\n address: \"제주 서귀포시 성산읍 성산리 1\",\r\n img: \"https://www.jeju.go.kr/pub/site/geopark/images/sub/sub03/02%EC%A7%80%EC%A7%88%EB%A7%88%EC%9D%84%EC%9D%B4%EC%95%BC%EA%B8%B0/%EC%A7%80%EC%A7%88%EB%A7%88%EC%9D%84/%EC%A7%80%EC%A7%88%EB%A7%88%EC%9D%84_%EC%84%B1%EC%82%B0%EC%9D%BC%EC%B6%9C%EB%B4%89/1412402261.jpg?400/400\",\r\n }, {\r\n name: \"해녀의 집(haenyeo)\",\r\n address: \"제주 서귀포시 성산읍 한도로 141-13지번오조리 3 오조해녀의집\",\r\n img: \"https://mblogthumb-phinf.pstatic.net/MjAxNjExMTdfMTc0/MDAxNDc5MzU3ODU0ODQy.KZYXCjzsXT3rCsE4HXBfxyCg2buvluBvN_7NxVp7BSwg.loJc89d8JjGXdNCn-4yMd7aMWPjfrZn21TI9Hyzemkog.JPEG.icocam11/20161010_100205.jpg?type=w800\",\r\n }, {\r\n name: \"오설록 티 뮤지엄(osulloc)\",\r\n address: \"제주 서귀포시 안덕면 신화역사로 15 오설록지번서광리 1235-1 오설록\",\r\n img: \"https://cdnweb01.wikitree.co.kr/webdata/editor/202007/01/img_20200701143323_2ced7627.webp\",\r\n }, {\r\n name: \"오설록 티 뮤지엄(osulloc)\",\r\n address: \"제주 서귀포시 안덕면 신화역사로 15 오설록지번서광리 1235-1 오설록\",\r\n img: \"https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg/269px-KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg\",\r\n }]\r\n\r\n if (state !== false) {\r\n // console.log(queryString.parse(props.location.search))\r\n // = {keyword:search}\r\n // return ;\r\n // history.pushState(null, null, \"?\"+queryParams.toString());\r\n // return ;\r\n }\r\n\r\n const handlePage = (num) => {\r\n setIndex(num);\r\n console.log(\"pagenation num\", num)\r\n console.log(index)\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 = (e) => {\r\n e.preventDefault()\r\n setState(true)\r\n setIndex(1)\r\n }\r\n\r\n function paginate(items, pageNumber, itemNumber) {\r\n const page = [];\r\n const startIndex = (pageNumber - 1) * itemNumber\r\n for (var i = 0; i < itemNumber; i++) {\r\n\r\n page.push(items[(startIndex + i)])\r\n }\r\n console.log(\"뿌릴 data22222222222222222\", page)\r\n return page\r\n }\r\n //usestate 쓰거나 한번에 useeffect에 넣기\r\n\r\n\r\n\r\n\r\n let time = new Date()\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {time.toLocaleString()}\r\n \r\n\r\n {console.log(\"#####################33\", pagePlace)}\r\n {pagePlace.map((place, index) => {\r\n return (\r\n \r\n \r\n {place.name}\r\n \r\n \r\n \r\n {place.address} \r\n \r\n setShowSet([false, false, false, false])} />\r\n \r\n \r\n \r\n )\r\n })}\r\n\r\n\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Search;\r\n","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js",[],{"ruleId":"39","severity":1,"message":"40","line":7,"column":8,"nodeType":"41","messageId":"42","endLine":7,"endColumn":13},{"ruleId":"39","severity":1,"message":"43","line":7,"column":14,"nodeType":"41","messageId":"42","endLine":7,"endColumn":19},{"ruleId":"44","severity":1,"message":"45","line":21,"column":6,"nodeType":"46","endLine":21,"endColumn":8,"suggestions":"47"},{"ruleId":"39","severity":1,"message":"48","line":2,"column":16,"nodeType":"41","messageId":"42","endLine":2,"endColumn":24},{"ruleId":"39","severity":1,"message":"49","line":16,"column":12,"nodeType":"41","messageId":"42","endLine":16,"endColumn":18},{"ruleId":"44","severity":1,"message":"50","line":44,"column":8,"nodeType":"46","endLine":44,"endColumn":10,"suggestions":"51"},{"ruleId":"44","severity":1,"message":"52","line":57,"column":8,"nodeType":"46","endLine":57,"endColumn":28,"suggestions":"53"},{"ruleId":"44","severity":1,"message":"54","line":67,"column":8,"nodeType":"46","endLine":67,"endColumn":15,"suggestions":"55"},{"ruleId":"39","severity":1,"message":"56","line":70,"column":11,"nodeType":"41","messageId":"42","endLine":70,"endColumn":17},{"ruleId":"57","severity":1,"message":"58","line":140,"column":35,"nodeType":"59","endLine":140,"endColumn":76},"no-unused-vars","'axios' is defined but never used.","Identifier","unusedVar","'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",["60"],"'Redirect' is defined but never used.","'mobile' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'getAssociation'. Either include it or remove the dependency array.",["61"],"React Hook useEffect has missing dependencies: 'endPage' and 'pagePlace'. Either include them or remove the dependency array.",["62"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["63"],"'places' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute",{"desc":"64","fix":"65"},{"desc":"66","fix":"67"},{"desc":"68","fix":"69"},{"desc":"70","fix":"71"},"Update the dependencies array to be: [getReview]",{"range":"72","text":"73"},"Update the dependencies array to be: [getAssociation]",{"range":"74","text":"75"},"Update the dependencies array to be: [association, endPage, index, pagePlace]",{"range":"76","text":"77"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"78","text":"79"},[605,607],"[getReview]",[1573,1575],"[getAssociation]",[1973,1993],"[association, endPage, index, pagePlace]",[2223,2230],"[getAssociation, props.history, search, state]"]