Commit b9552a52 authored by baesangjune's avatar baesangjune
Browse files

세부UI 수정

parent b11c4c5d
[{"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\\Paginations.js":"3","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js":"4","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js":"5","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\PrivateRoute.js":"6","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Bookmark.js":"7","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Login.js":"8","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js":"9","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js":"10","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js":"11"},{"size":1339,"mtime":1612133560398,"results":"12","hashOfConfig":"13"},{"size":375,"mtime":1611254909401,"results":"14","hashOfConfig":"13"},{"size":3725,"mtime":1612133560393,"results":"15","hashOfConfig":"13"},{"size":8409,"mtime":1612135856710,"results":"16","hashOfConfig":"13"},{"size":4920,"mtime":1612136347104,"results":"17","hashOfConfig":"13"},{"size":438,"mtime":1612133560394,"results":"18","hashOfConfig":"13"},{"size":5573,"mtime":1612136236838,"results":"19","hashOfConfig":"13"},{"size":3150,"mtime":1612140232971,"results":"20","hashOfConfig":"13"},{"size":2959,"mtime":1612133560395,"results":"21","hashOfConfig":"13"},{"size":2355,"mtime":1612139729084,"results":"22","hashOfConfig":"13"},{"size":766,"mtime":1612140214129,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"13y9yvi",{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":10,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":9,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",[],["48","49"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js",["50","51","52","53","54","55","56","57","58","59"],"import React, { useState, useEffect } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport ohuh from '../ohuh-sm.PNG';\r\nimport { Container, Form, Row, Col, Card, Image, InputGroup, FormControl, Button, Nav } from 'react-bootstrap';\r\nimport Paginations from '../Components/Paginations';\r\nimport axios from 'axios';\r\nimport queryString from 'query-string'\r\nimport * as Icon from 'react-bootstrap-icons';\r\nimport { isAuthenticated } from '../utils/auth';\r\nimport catchErrors from '../utils/catchErrors'\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 [bookmark, setBookmark] = useState([false, false, false, false])\r\n const user = isAuthenticated()\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 const [error, setError] = useState('')\r\n\r\n async function getBookmark() {\r\n try {\r\n const response = await axios.get(`/api/users/bookmark?ID=${user}`)\r\n // setBookmark(response.data.bookmark)\r\n } catch (error) {\r\n catchErrors(error, setError)\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 }, []);\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 setEndPage(Math.floor((association.length / 4)))\r\n\r\n }, [association, index])\r\n\r\n useEffect(() => {\r\n getAssociation()\r\n if (state) {\r\n // window.location.reload()\r\n // return <Redirect to={{\r\n // pathname: `/search?keyword=${search}`,\r\n // state: { id: search },\r\n // }} />;\r\n props.history.push('/search?keyword=' + search)\r\n setState(false)\r\n // console.log(\"search야\", search)\r\n } window.addEventListener(\"scroll\", infiniteScroll);\r\n return () => { window.removeEventListener(\"scroll\", infiniteScroll); }\r\n }, [state]);\r\n\r\n const infiniteScroll = () => {\r\n const { documentElement, body } = document;\r\n const scrollHeight = Math.max(documentElement.scrollHeight, body.scrollHeight);\r\n const scrollTop = Math.max(documentElement.scrollTop, body.scrollTop);\r\n const clientHeight = documentElement.clientHeight;\r\n if (scrollTop + clientHeight >= scrollHeight) {\r\n // getReview();\r\n console.log(\"더불러\")\r\n }\r\n console.log(scrollHeight, scrollTop, clientHeight)\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 async function handlebookmark(index) {\r\n if (!bookmark[index]) {\r\n console.log(pagePlace[index])\r\n try {\r\n const response = await axios.put(`/api/users/bookmark?ID=${user}&place=${pagePlace[index]._id}`)\r\n alert(response.data, '북마크가 저장되었습니다.')\r\n const showArr = bookmark\r\n showArr[index] = true\r\n setBookmark(showArr)\r\n console.log(\"bookmark=\", bookmark)\r\n } catch (error) {\r\n catchErrors(error, setError)\r\n }\r\n } else {\r\n try {\r\n const response = await axios.delete(`/api/users/bookmark?ID=${user}&place=${pagePlace[index]._id}`)\r\n alert(response.data, '저장된 북마크가 삭제되었습니다.')\r\n const showArr = bookmark\r\n showArr[index] = false\r\n setBookmark(showArr)\r\n console.log(\"bookmark=\", bookmark)\r\n } catch (error) {\r\n catchErrors(error, setError)\r\n }\r\n }\r\n }\r\n\r\n\r\n let time = new Date()\r\n\r\n return (\r\n <Container >\r\n <Link to=\"/\" className=\"d-flex justify-content-center\"><Image src={ohuh} /></Link>\r\n <Row className=\"mb-2\" className=\"d-flex justify-content-center\">\r\n <Form style={{ width: \"90vw\" }} onSubmit={handleSubmit}>\r\n <InputGroup size=\"lg\">\r\n <FormControl\r\n placeholder=\"검색어를 입력하세요.\"\r\n value={search}\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 {/* {time.toLocaleString()} */}\r\n <Row className=\"d-flex flex-wrap\">\r\n\r\n {console.log(\"#####################33\", pagePlace)}\r\n {pagePlace.map((place, index) => {\r\n return (\r\n <Col key={index} md={6} >\r\n <Card align=\"center\" border=\"info\" style={{ margin: \"3%\" }}>\r\n\r\n <Card.Title className=\"d-flex justify-content-center\" style={{ margin: \"3%\", fontSize: '200%', fontWeight: 'bold' }} >{place.name}\r\n {user ?\r\n <Button\r\n variant={bookmark[index] ? \"primary\" : \"light\"}\r\n onClick={() => handlebookmark(index, place)}>\r\n <Icon.BookmarkStarFill size={35} />\r\n {console.log(\"bookmark\", bookmark)}\r\n {console.log(\"bookmark[index]\", bookmark[index])}</Button> : null}\r\n </Card.Title>\r\n <Card.Img variant=\"top\" style={{ padding: \"5%\", width: \"100%\", height: \"340px\" }} src={place.img} />\r\n <Card.Body>\r\n <Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height: \"80px\" }} >\r\n {place.address} </Card.Text>\r\n <Link to={`/place?id=${index}&place=${place.name}`} >\r\n <Button variant=\"primary\"> {place.name} 자세히 살펴보기</Button>\r\n </Link>\r\n </Card.Body>\r\n </Card>\r\n </Col>\r\n )\r\n })}\r\n </Row>\r\n <Row className=\"mt-2 d-flex justify-content-center\">\r\n <Paginations index={index} endPage={endPage} handlePage={handlePage}></Paginations>\r\n </Row>\r\n </Container >\r\n );\r\n}\r\n\r\nexport default Search;\r\n","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\PrivateRoute.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Bookmark.js",["60","61","62","63","64","65","66","67","68"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Login.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js",["69"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js",[],{"ruleId":"70","replacedBy":"71"},{"ruleId":"72","replacedBy":"73"},{"ruleId":"74","severity":1,"message":"75","line":4,"column":83,"nodeType":"76","messageId":"77","endLine":4,"endColumn":86},{"ruleId":"74","severity":1,"message":"78","line":16,"column":12,"nodeType":"76","messageId":"77","endLine":16,"endColumn":19},{"ruleId":"74","severity":1,"message":"79","line":16,"column":21,"nodeType":"76","messageId":"77","endLine":16,"endColumn":31},{"ruleId":"74","severity":1,"message":"80","line":23,"column":12,"nodeType":"76","messageId":"77","endLine":23,"endColumn":17},{"ruleId":"74","severity":1,"message":"81","line":25,"column":20,"nodeType":"76","messageId":"77","endLine":25,"endColumn":31},{"ruleId":"74","severity":1,"message":"82","line":27,"column":19,"nodeType":"76","messageId":"77","endLine":27,"endColumn":27},{"ruleId":"83","severity":1,"message":"84","line":49,"column":8,"nodeType":"85","endLine":49,"endColumn":10,"suggestions":"86"},{"ruleId":"83","severity":1,"message":"87","line":75,"column":8,"nodeType":"85","endLine":75,"endColumn":15,"suggestions":"88"},{"ruleId":"74","severity":1,"message":"89","line":146,"column":9,"nodeType":"76","messageId":"77","endLine":146,"endColumn":13},{"ruleId":"90","severity":1,"message":"91","line":151,"column":35,"nodeType":"92","endLine":151,"endColumn":76},{"ruleId":"74","severity":1,"message":"93","line":17,"column":12,"nodeType":"76","messageId":"77","endLine":17,"endColumn":16},{"ruleId":"74","severity":1,"message":"94","line":17,"column":18,"nodeType":"76","messageId":"77","endLine":17,"endColumn":25},{"ruleId":"74","severity":1,"message":"95","line":18,"column":12,"nodeType":"76","messageId":"77","endLine":18,"endColumn":17},{"ruleId":"74","severity":1,"message":"96","line":18,"column":19,"nodeType":"76","messageId":"77","endLine":18,"endColumn":27},{"ruleId":"74","severity":1,"message":"80","line":19,"column":12,"nodeType":"76","messageId":"77","endLine":19,"endColumn":17},{"ruleId":"74","severity":1,"message":"97","line":20,"column":12,"nodeType":"76","messageId":"77","endLine":20,"endColumn":17},{"ruleId":"74","severity":1,"message":"98","line":20,"column":19,"nodeType":"76","messageId":"77","endLine":20,"endColumn":27},{"ruleId":"74","severity":1,"message":"78","line":23,"column":12,"nodeType":"76","messageId":"77","endLine":23,"endColumn":19},{"ruleId":"83","severity":1,"message":"99","line":65,"column":8,"nodeType":"85","endLine":65,"endColumn":10,"suggestions":"100"},{"ruleId":"83","severity":1,"message":"101","line":36,"column":6,"nodeType":"85","endLine":36,"endColumn":8,"suggestions":"102"},"no-native-reassign",["103"],"no-negated-in-lhs",["104"],"no-unused-vars","'Nav' is defined but never used.","Identifier","unusedVar","'showSet' is assigned a value but never used.","'setShowSet' is assigned a value but never used.","'error' is assigned a value but never used.","'getBookmark' is defined but never used.","'response' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getAssociation'. Either include it or remove the dependency array.","ArrayExpression",["105"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["106"],"'time' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'page' is assigned a value but never used.","'setPage' is assigned a value but never used.","'index' is assigned a value but never used.","'setIndex' is assigned a value but never used.","'state' is assigned a value but never used.","'setState' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array.",["107"],"React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["108"],"no-global-assign","no-unsafe-negation",{"desc":"109","fix":"110"},{"desc":"111","fix":"112"},{"desc":"113","fix":"114"},{"desc":"115","fix":"116"},"Update the dependencies array to be: [getAssociation]",{"range":"117","text":"118"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"119","text":"120"},"Update the dependencies array to be: [getBookmark]",{"range":"121","text":"122"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"123","text":"124"},[1921,1923],"[getAssociation]",[2830,2837],"[getAssociation, props.history, search, state]",[2252,2254],"[getBookmark]",[1178,1180],"[getReview, infiniteScroll]"]
\ No newline at end of file
[{"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\\Paginations.js":"3","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js":"4","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js":"5","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\PrivateRoute.js":"6","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Bookmark.js":"7","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Login.js":"8","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js":"9","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js":"10","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js":"11"},{"size":1339,"mtime":1612133560398,"results":"12","hashOfConfig":"13"},{"size":375,"mtime":1611254909401,"results":"14","hashOfConfig":"13"},{"size":3725,"mtime":1612133560393,"results":"15","hashOfConfig":"13"},{"size":8571,"mtime":1612143522894,"results":"16","hashOfConfig":"13"},{"size":4779,"mtime":1612143461892,"results":"17","hashOfConfig":"13"},{"size":438,"mtime":1612133560394,"results":"18","hashOfConfig":"13"},{"size":5573,"mtime":1612136236838,"results":"19","hashOfConfig":"13"},{"size":3150,"mtime":1612140232971,"results":"20","hashOfConfig":"13"},{"size":2959,"mtime":1612133560395,"results":"21","hashOfConfig":"13"},{"size":2355,"mtime":1612139729084,"results":"22","hashOfConfig":"13"},{"size":766,"mtime":1612140214129,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"13y9yvi",{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":10,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":9,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",[],["47","48"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js",["49","50","51","52","53","54","55","56","57","58"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\PrivateRoute.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Bookmark.js",["59","60","61","62","63","64","65","66","67"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Login.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js",["68"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js",[],{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","severity":1,"message":"74","line":4,"column":83,"nodeType":"75","messageId":"76","endLine":4,"endColumn":86},{"ruleId":"73","severity":1,"message":"77","line":16,"column":12,"nodeType":"75","messageId":"76","endLine":16,"endColumn":19},{"ruleId":"73","severity":1,"message":"78","line":16,"column":21,"nodeType":"75","messageId":"76","endLine":16,"endColumn":31},{"ruleId":"73","severity":1,"message":"79","line":23,"column":12,"nodeType":"75","messageId":"76","endLine":23,"endColumn":17},{"ruleId":"73","severity":1,"message":"80","line":25,"column":20,"nodeType":"75","messageId":"76","endLine":25,"endColumn":31},{"ruleId":"73","severity":1,"message":"81","line":27,"column":19,"nodeType":"75","messageId":"76","endLine":27,"endColumn":27},{"ruleId":"82","severity":1,"message":"83","line":49,"column":8,"nodeType":"84","endLine":49,"endColumn":10,"suggestions":"85"},{"ruleId":"82","severity":1,"message":"86","line":75,"column":8,"nodeType":"84","endLine":75,"endColumn":15,"suggestions":"87"},{"ruleId":"73","severity":1,"message":"88","line":146,"column":9,"nodeType":"75","messageId":"76","endLine":146,"endColumn":13},{"ruleId":"89","severity":1,"message":"90","line":151,"column":35,"nodeType":"91","endLine":151,"endColumn":76},{"ruleId":"73","severity":1,"message":"92","line":17,"column":12,"nodeType":"75","messageId":"76","endLine":17,"endColumn":16},{"ruleId":"73","severity":1,"message":"93","line":17,"column":18,"nodeType":"75","messageId":"76","endLine":17,"endColumn":25},{"ruleId":"73","severity":1,"message":"94","line":18,"column":12,"nodeType":"75","messageId":"76","endLine":18,"endColumn":17},{"ruleId":"73","severity":1,"message":"95","line":18,"column":19,"nodeType":"75","messageId":"76","endLine":18,"endColumn":27},{"ruleId":"73","severity":1,"message":"79","line":19,"column":12,"nodeType":"75","messageId":"76","endLine":19,"endColumn":17},{"ruleId":"73","severity":1,"message":"96","line":20,"column":12,"nodeType":"75","messageId":"76","endLine":20,"endColumn":17},{"ruleId":"73","severity":1,"message":"97","line":20,"column":19,"nodeType":"75","messageId":"76","endLine":20,"endColumn":27},{"ruleId":"73","severity":1,"message":"77","line":23,"column":12,"nodeType":"75","messageId":"76","endLine":23,"endColumn":19},{"ruleId":"82","severity":1,"message":"98","line":65,"column":8,"nodeType":"84","endLine":65,"endColumn":10,"suggestions":"99"},{"ruleId":"82","severity":1,"message":"100","line":36,"column":6,"nodeType":"84","endLine":36,"endColumn":8,"suggestions":"101"},"no-native-reassign",["102"],"no-negated-in-lhs",["103"],"no-unused-vars","'Nav' is defined but never used.","Identifier","unusedVar","'showSet' is assigned a value but never used.","'setShowSet' is assigned a value but never used.","'error' is assigned a value but never used.","'getBookmark' is defined but never used.","'response' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getAssociation'. Either include it or remove the dependency array.","ArrayExpression",["104"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["105"],"'time' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'page' is assigned a value but never used.","'setPage' is assigned a value but never used.","'index' is assigned a value but never used.","'setIndex' is assigned a value but never used.","'state' is assigned a value but never used.","'setState' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array.",["106"],"React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["107"],"no-global-assign","no-unsafe-negation",{"desc":"108","fix":"109"},{"desc":"110","fix":"111"},{"desc":"112","fix":"113"},{"desc":"114","fix":"115"},"Update the dependencies array to be: [getAssociation]",{"range":"116","text":"117"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"118","text":"119"},"Update the dependencies array to be: [getBookmark]",{"range":"120","text":"121"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"122","text":"123"},[1921,1923],"[getAssociation]",[2830,2837],"[getAssociation, props.history, search, state]",[2252,2254],"[getBookmark]",[1178,1180],"[getReview, infiniteScroll]"]
\ No newline at end of file
......@@ -53,15 +53,8 @@ function App() {
return (
// <Container className="vh-100 ">
// <Col md={12} >
// <Row className="justify-content-center" >
// <Image src={ohuh} style={{ margin: "5%", marginTop : "3%" }} />
// </Row>
// <Row style={{ marginBottom: "5%" }}>
<Container className="vh-100 ">
<Col md={12} >
<Col xs={12} >
<Nav className="justify-content-end" bg="#fff" variant="light" style={{}} >
{user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>
: (
......@@ -72,8 +65,10 @@ function App() {
)}
<Nav.Link href='/bookmark'>북마크</Nav.Link>
</Nav>
<Row className="justify-content-center">
<Image src={ohuh} style={{ margin: "3%", marginTop : "3%" }} />
<Row className="justify-content-center" md={2}>
<Col className="d-flex justify-content-center">
<Image src={ohuh} style={{ margin: "3%", marginTop : "3%" }} fluid />
</Col>
</Row>
<Row style={{ marginBottom: "5%" }}>
<Form className="vw-100" onSubmit={handleSubmit}>
......@@ -91,11 +86,11 @@ function App() {
</InputGroup>
</Form>
</Row>
<Row >
<Col md={6} >
<Row xs={6}>
<Col md={6} xs={12}>
<h1 className=" d-flex justify-content-center" style={{ marginBottom: "7%" }}>인기관광지</h1>
<Card align="center" border="info" style={{ margin: "3%" }}>
<Card.Title style={{ margin: "3%", fontSize: '200%', fontWeight: 'bold' }} >{recommend.name}</Card.Title>
<Card.Header style={{ margin: "0",fontSize: '200%', fontWeight: 'bold' }} >{recommend.name}</Card.Header>
<Card.Img variant="top" style={{ padding: "5%", width: "100%", height: "340px" }} src={recommend.img} />
<Card.Body >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height: "80px" }} >
......@@ -107,10 +102,10 @@ function App() {
</Card>
</Col>
<Col md={6} >
<Col md={6} xs={12}>
<h1 className=" d-flex justify-content-center" style={{ marginBottom: "7%" }}>최근 검색관광지</h1>
<Card align="center" border="info" style={{ margin: "3%" }}>
<Card.Title style={{ margin: "3%", fontSize: '200%', fontWeight: 'bold' }} >{latest.name}</Card.Title>
<Card align="center" border="info" style={{ margin: "3%" }} >
<Card.Header style={{ margin: "0", fontSize: '200%', fontWeight: 'bold'}} bg="danger">{latest.name}</Card.Header>
<Card.Img variant="top" style={{ padding: "5%", width: "100%", height: "340px" }} src={latest.img} />
<Card.Body >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height: "80px" }} >
......
......@@ -171,17 +171,18 @@ function Search(props) {
{pagePlace.map((place, index) => {
return (
<Col key={index} md={6} >
<Card align="center" border="info" style={{ margin: "3%" }}>
<Card.Title className="d-flex justify-content-center" style={{ margin: "3%", fontSize: '200%', fontWeight: 'bold' }} >{place.name}
{user ?
<Button
variant={bookmark[index] ? "primary" : "light"}
onClick={() => handlebookmark(index, place)}>
<Icon.BookmarkStarFill size={35} />
{console.log("bookmark", bookmark)}
{console.log("bookmark[index]", bookmark[index])}</Button> : null}
</Card.Title>
<Card align="center" border="info" style={{ margin: "2%" }}>
<Row className="d-flex justify-content-center">
<Card.Header style={{ margin: "0", marginLeft:"3%",marginRight:"3%",fontSize: '200%', fontWeight: 'bold', width :"100vw"}} >{place.name}
{user ?
<Button
variant={bookmark[index] ? "primary" : "light"}
onClick={() => handlebookmark(index, place)}>
<Icon.BookmarkStarFill size={35} />
{console.log("bookmark", bookmark)}
{console.log("bookmark[index]", bookmark[index])}</Button> : null}
</Card.Header>
</Row>
<Card.Img variant="top" style={{ padding: "5%", width: "100%", height: "340px" }} src={place.img} />
<Card.Body>
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height: "80px" }} >
......
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