Commit 7328a5eb authored by baesangjune's avatar baesangjune
Browse files

하하

parent 87f0d0a6
[{"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":2199,"mtime":1611254909395,"results":"11","hashOfConfig":"8"},{"size":7660,"mtime":1611504775920,"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":null},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",["27"],"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 <React.StrictMode>\r\n <Router>\r\n <Switch>\r\n <Route exact path=\"/\" component={App} />\r\n <Route path=\"/search\" component={Search} />\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","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Place.js",["28","29"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js",["30","31","32","33","34"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js",[],{"ruleId":"35","severity":1,"message":"36","line":7,"column":8,"nodeType":"37","messageId":"38","endLine":7,"endColumn":13},{"ruleId":"35","severity":1,"message":"39","line":7,"column":14,"nodeType":"37","messageId":"38","endLine":7,"endColumn":19},{"ruleId":"40","severity":1,"message":"41","line":21,"column":6,"nodeType":"42","endLine":21,"endColumn":8,"suggestions":"43"},{"ruleId":"35","severity":1,"message":"44","line":16,"column":12,"nodeType":"37","messageId":"38","endLine":16,"endColumn":18},{"ruleId":"35","severity":1,"message":"45","line":17,"column":12,"nodeType":"37","messageId":"38","endLine":17,"endColumn":17},{"ruleId":"40","severity":1,"message":"46","line":68,"column":8,"nodeType":"42","endLine":68,"endColumn":10,"suggestions":"47"},{"ruleId":"35","severity":1,"message":"48","line":75,"column":11,"nodeType":"37","messageId":"38","endLine":75,"endColumn":17},{"ruleId":"49","severity":1,"message":"50","line":133,"column":35,"nodeType":"51","endLine":133,"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",["52"],"'mobile' is assigned a value but never used.","'place' is assigned a value but never used.","React Hook useEffect has missing dependencies: 'getAssociation', 'getImg', and 'getPlace'. Either include them or remove the dependency array.",["53"],"'places' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute",{"desc":"54","fix":"55"},{"desc":"56","fix":"57"},"Update the dependencies array to be: [getReview]",{"range":"58","text":"59"},"Update the dependencies array to be: [getAssociation, getImg, getPlace]",{"range":"60","text":"61"},[605,607],"[getReview]",[2275,2277],"[getAssociation, getImg, getPlace]"] [{"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":2199,"mtime":1611254909395,"results":"11","hashOfConfig":"8"},{"size":7536,"mtime":1611512487907,"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":null},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",["27"],"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 <React.StrictMode>\r\n <Router>\r\n <Switch>\r\n <Route exact path=\"/\" component={App} />\r\n <Route path=\"/search\" component={Search} />\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","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Place.js",["28","29"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js",["30","31","32","33","34","35"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js",[],{"ruleId":"36","severity":1,"message":"37","line":7,"column":8,"nodeType":"38","messageId":"39","endLine":7,"endColumn":13},{"ruleId":"36","severity":1,"message":"40","line":7,"column":14,"nodeType":"38","messageId":"39","endLine":7,"endColumn":19},{"ruleId":"41","severity":1,"message":"42","line":21,"column":6,"nodeType":"43","endLine":21,"endColumn":8,"suggestions":"44"},{"ruleId":"36","severity":1,"message":"45","line":16,"column":12,"nodeType":"38","messageId":"39","endLine":16,"endColumn":18},{"ruleId":"36","severity":1,"message":"46","line":17,"column":12,"nodeType":"38","messageId":"39","endLine":17,"endColumn":17},{"ruleId":"36","severity":1,"message":"47","line":18,"column":12,"nodeType":"38","messageId":"39","endLine":18,"endColumn":18},{"ruleId":"41","severity":1,"message":"48","line":68,"column":8,"nodeType":"43","endLine":68,"endColumn":10,"suggestions":"49"},{"ruleId":"36","severity":1,"message":"50","line":75,"column":11,"nodeType":"38","messageId":"39","endLine":75,"endColumn":17},{"ruleId":"51","severity":1,"message":"52","line":133,"column":35,"nodeType":"53","endLine":133,"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",["54"],"'mobile' is assigned a value but never used.","'place' is assigned a value but never used.","'imgUrl' is assigned a value but never used.","React Hook useEffect has missing dependencies: 'getAssociation', 'getImg', and 'getPlace'. Either include them or remove the dependency array.",["55"],"'places' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute",{"desc":"56","fix":"57"},{"desc":"58","fix":"59"},"Update the dependencies array to be: [getReview]",{"range":"60","text":"61"},"Update the dependencies array to be: [getAssociation, getImg, getPlace]",{"range":"62","text":"63"},[605,607],"[getReview]",[2260,2262],"[getAssociation, getImg, getPlace]"]
\ No newline at end of file \ No newline at end of file
...@@ -18,7 +18,17 @@ function Search(props) { ...@@ -18,7 +18,17 @@ function Search(props) {
const [imgUrl, setImgUrl] = useState([]) const [imgUrl, setImgUrl] = useState([])
const [association, setAssociation] = useState([]) const [association, setAssociation] = useState([])
console.log("search###############", search) // console.log("search###############", search)
const getPlace = () => {
axios.get(`/api/search/places?keyword=${search}`)
.then(res => {
console.log("places=", res.data)
setPlace(res.data)
})
.catch(err => {
console.log('search.places 에러 발생', err)
})
}
const getImg = () => { const getImg = () => {
axios.get(`/api/search/imges?keyword=${search}`) axios.get(`/api/search/imges?keyword=${search}`)
...@@ -31,16 +41,7 @@ function Search(props) { ...@@ -31,16 +41,7 @@ function Search(props) {
}) })
} }
const getPlace = () => {
axios.get(`/api/search/places?keyword=${search}`)
.then(res => {
console.log("places=", res.data)
setPlace(res.data)
})
.catch(err => {
console.log('search.places 에러 발생', err)
})
}
const getAssociation = () => { const getAssociation = () => {
axios.get(`/api/search/association?keyword=${search}`) axios.get(`/api/search/association?keyword=${search}`)
...@@ -58,7 +59,6 @@ function Search(props) { ...@@ -58,7 +59,6 @@ function Search(props) {
useEffect(() => { useEffect(() => {
getPlace() getPlace()
getImg() getImg()
getPlace()
getAssociation() getAssociation()
if (window.innerWidth < 960) { if (window.innerWidth < 960) {
setMobile(true) setMobile(true)
...@@ -146,9 +146,6 @@ function Search(props) { ...@@ -146,9 +146,6 @@ function Search(props) {
</InputGroup> </InputGroup>
</Form> </Form>
</Row> </Row>
<Image src={imgUrl} />
{time.toLocaleString()} {time.toLocaleString()}
<Row className="d-flex flex-wrap"> <Row className="d-flex flex-wrap">
{pagePlace.map((place, index) => { {pagePlace.map((place, index) => {
...@@ -165,7 +162,6 @@ function Search(props) { ...@@ -165,7 +162,6 @@ function Search(props) {
showArr[index] = true showArr[index] = true
setShowSet(showArr) setShowSet(showArr)
}}>{place.name} 자세히 살펴보기</Button> }}>{place.name} 자세히 살펴보기</Button>
{console.log("pppppppp",place)}
<Place place={place} index={index} show={showSet[index]} onHide={() => setShowSet([false, false, false, false])} /> <Place place={place} index={index} show={showSet[index]} onHide={() => setShowSet([false, false, false, false])} />
</Card.Body> </Card.Body>
</Card> </Card>
......
...@@ -57,11 +57,7 @@ const searchImg = async (req, res) => { ...@@ -57,11 +57,7 @@ const searchImg = async (req, res) => {
//사진만 업데이트 //사진만 업데이트
let Place = await Places.findOne({ name: req.query.keyword }) let Place = await Places.findOne({ name: req.query.keyword })
Place.times.push(new Date().toLocaleString()) Place.times.push(new Date().toLocaleString())
await Places.updateOne({ name: req.p }, { img: images, times: Place.times }) await Places.updateOne({ name: req.query.keyword }, { img: images, times: Place.times })
const newPlaces = await new Places(
).save()
res.send(images) res.send(images)
}) })
......
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