[{"C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\index.js":"1","C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\Search.js":"2","C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\Place.js":"3","C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\Bookmark.js":"4","C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js":"5","C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\App.js":"6"},{"size":1382,"mtime":1611896266675,"results":"7","hashOfConfig":"8"},{"size":10702,"mtime":1612140473960,"results":"9","hashOfConfig":"8"},{"size":6447,"mtime":1612140520700,"results":"10","hashOfConfig":"8"},{"size":5229,"mtime":1612006492438,"results":"11","hashOfConfig":"8"},{"size":3725,"mtime":1612140572407,"results":"12","hashOfConfig":"8"},{"size":2131,"mtime":1612140593373,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"1n20xnc",{"filePath":"16","messages":"17","errorCount":0,"warningCount":15,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"18","messages":"19","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"20","messages":"21","errorCount":0,"warningCount":15,"fixableErrorCount":0,"fixableWarningCount":0,"source":"22"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\index.js",["27"],"C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\Search.js",["28","29","30","31","32","33","34","35","36","37","38","39","40","41","42"],"C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\Place.js",["43","44","45","46","47"],"C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\Bookmark.js",["48","49","50","51","52","53","54","55","56","57","58","59","60","61","62"],"import React, { useState, useEffect } from 'react'\r\nimport { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar, Image } from \"react-bootstrap\"\r\nimport axios from \"axios\"\r\nimport ohuh from '../ohuh-sm.PNG';\r\nimport catchErrors from '../utils/catchErrors.js'\r\nimport { isAuthenticated } from '../utils/auth'\r\nimport * as Icon from 'react-bootstrap-icons';\r\nimport { Link, Redirect } from 'react-router-dom';\r\n\r\n\r\nconst INIT_PAGE = {\r\n bookmark: []\r\n}\r\n\r\n\r\nfunction Bookmark() {\r\n const [page, setPage] = useState(INIT_PAGE)\r\n const [index, setIndex] = useState(1);\r\n const [error, setError] = useState('')\r\n const [state, setState] = useState(false);\r\n const [bookmark, setBookmark] = useState([false, false, false, false])\r\n const [pagePlace, setPagePlace] = useState([])\r\n const [showSet, setShowSet] = useState([false, false, false, false]);\r\n\r\n const user = isAuthenticated()\r\n\r\n async function getBookmark() {\r\n try {\r\n const response = await axios.get(`/api/users/bookmark?ID=${user}`)\r\n setPagePlace(response.data.bookmark)\r\n } catch (error) {\r\n catchErrors(error, setError)\r\n }\r\n }\r\n\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}`)\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 useEffect(() => {\r\n getBookmark()\r\n }, [])\r\n\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n

북마크

\r\n
\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\r\n {place.name}\r\n {user ?\r\n handleBookmark(index, place)}>\r\n \r\n {console.log(\"bookmark\", bookmark)}\r\n {console.log(\"bookmark[index]\", bookmark[index])} : null}\r\n \r\n \r\n \r\n \r\n {place.address} \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 Bookmark\r\n\r\n\r\n // async function handleSubmit(e){\r\n // setState(true); //버튼이 눌려서 handlesubmit이될때 setState값이 true로 바뀐다\r\n // try { //respons 서버에 post로 요청하여 데이터를 받아온다\r\n // const response = await axios.post('/api/users/bookmark', page)\r\n // setSuccess(true)\r\n // } catch (error) {\r\n // console.log(error)\r\n // catchErrors(error, setError)\r\n // }\r\n // }\r\n\r\n // useEffect(() => {\r\n // getBookmark(user)\r\n // }, [user])","C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\sag06\\Desktop\\project\\search-page\\client\\src\\Pages\\App.js",[],{"ruleId":null,"fatal":true,"severity":2,"message":"63","line":26,"column":2},{"ruleId":"64","severity":1,"message":"65","line":2,"column":16,"nodeType":"66","messageId":"67","endLine":2,"endColumn":24},{"ruleId":"64","severity":1,"message":"68","line":4,"column":83,"nodeType":"66","messageId":"67","endLine":4,"endColumn":86},{"ruleId":"64","severity":1,"message":"69","line":16,"column":12,"nodeType":"66","messageId":"67","endLine":16,"endColumn":19},{"ruleId":"64","severity":1,"message":"70","line":16,"column":21,"nodeType":"66","messageId":"67","endLine":16,"endColumn":31},{"ruleId":"64","severity":1,"message":"71","line":20,"column":12,"nodeType":"66","messageId":"67","endLine":20,"endColumn":18},{"ruleId":"64","severity":1,"message":"72","line":20,"column":20,"nodeType":"66","messageId":"67","endLine":20,"endColumn":29},{"ruleId":"64","severity":1,"message":"73","line":24,"column":12,"nodeType":"66","messageId":"67","endLine":24,"endColumn":17},{"ruleId":"64","severity":1,"message":"74","line":26,"column":20,"nodeType":"66","messageId":"67","endLine":26,"endColumn":31},{"ruleId":"64","severity":1,"message":"75","line":28,"column":19,"nodeType":"66","messageId":"67","endLine":28,"endColumn":27},{"ruleId":"76","severity":1,"message":"77","line":50,"column":8,"nodeType":"78","endLine":50,"endColumn":10,"suggestions":"79"},{"ruleId":"76","severity":1,"message":"80","line":63,"column":8,"nodeType":"78","endLine":63,"endColumn":28,"suggestions":"81"},{"ruleId":"76","severity":1,"message":"82","line":78,"column":8,"nodeType":"78","endLine":78,"endColumn":15,"suggestions":"83"},{"ruleId":"64","severity":1,"message":"84","line":93,"column":11,"nodeType":"66","messageId":"67","endLine":93,"endColumn":17},{"ruleId":"64","severity":1,"message":"85","line":183,"column":9,"nodeType":"66","messageId":"67","endLine":183,"endColumn":13},{"ruleId":"86","severity":1,"message":"87","line":188,"column":35,"nodeType":"88","endLine":188,"endColumn":76},{"ruleId":"64","severity":1,"message":"89","line":1,"column":10,"nodeType":"90","messageId":"67","endLine":1,"endColumn":15},{"ruleId":"64","severity":1,"message":"91","line":4,"column":21,"nodeType":"66","messageId":"67","endLine":4,"endColumn":24},{"ruleId":"64","severity":1,"message":"92","line":4,"column":26,"nodeType":"66","messageId":"67","endLine":4,"endColumn":32},{"ruleId":"76","severity":1,"message":"93","line":61,"column":6,"nodeType":"78","endLine":61,"endColumn":8,"suggestions":"94"},{"ruleId":"95","severity":1,"message":"96","line":140,"column":11,"nodeType":"97","endLine":140,"endColumn":23},{"ruleId":"64","severity":1,"message":"98","line":2,"column":10,"nodeType":"66","messageId":"67","endLine":2,"endColumn":15},{"ruleId":"64","severity":1,"message":"99","line":2,"column":39,"nodeType":"66","messageId":"67","endLine":2,"endColumn":43},{"ruleId":"64","severity":1,"message":"68","line":2,"column":58,"nodeType":"66","messageId":"67","endLine":2,"endColumn":61},{"ruleId":"64","severity":1,"message":"100","line":2,"column":63,"nodeType":"66","messageId":"67","endLine":2,"endColumn":69},{"ruleId":"64","severity":1,"message":"65","line":8,"column":16,"nodeType":"66","messageId":"67","endLine":8,"endColumn":24},{"ruleId":"64","severity":1,"message":"101","line":17,"column":12,"nodeType":"66","messageId":"67","endLine":17,"endColumn":16},{"ruleId":"64","severity":1,"message":"102","line":17,"column":18,"nodeType":"66","messageId":"67","endLine":17,"endColumn":25},{"ruleId":"64","severity":1,"message":"103","line":18,"column":12,"nodeType":"66","messageId":"67","endLine":18,"endColumn":17},{"ruleId":"64","severity":1,"message":"104","line":18,"column":19,"nodeType":"66","messageId":"67","endLine":18,"endColumn":27},{"ruleId":"64","severity":1,"message":"73","line":19,"column":12,"nodeType":"66","messageId":"67","endLine":19,"endColumn":17},{"ruleId":"64","severity":1,"message":"105","line":20,"column":12,"nodeType":"66","messageId":"67","endLine":20,"endColumn":17},{"ruleId":"64","severity":1,"message":"106","line":20,"column":19,"nodeType":"66","messageId":"67","endLine":20,"endColumn":27},{"ruleId":"64","severity":1,"message":"69","line":23,"column":12,"nodeType":"66","messageId":"67","endLine":23,"endColumn":19},{"ruleId":"64","severity":1,"message":"70","line":23,"column":21,"nodeType":"66","messageId":"67","endLine":23,"endColumn":31},{"ruleId":"76","severity":1,"message":"107","line":65,"column":8,"nodeType":"78","endLine":65,"endColumn":10,"suggestions":"108"},"Parsing error: Unexpected token\n\n 24 | \n 25 | \n> 26 | <<<<<<< HEAD\n | ^\n 27 | \n 28 | =======\n 29 | ","no-unused-vars","'Redirect' is defined but never used.","Identifier","unusedVar","'Nav' is defined but never used.","'showSet' is assigned a value but never used.","'setShowSet' is assigned a value but never used.","'mobile' is assigned a value but never used.","'setMobile' 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",["109"],"React Hook useEffect has missing dependencies: 'endPage' and 'pagePlace'. Either include them or remove the dependency array.",["110"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["111"],"'places' is assigned a value but never used.","'time' is assigned a value but never used.","react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'kakao' is defined but never used.","Program","'Row' is defined but never used.","'Button' is defined but never used.","React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["112"],"jsx-a11y/anchor-is-valid","The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","JSXOpeningElement","'Alert' is defined but never used.","'Form' is defined but never used.","'Navbar' is defined but never used.","'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.",["113"],{"desc":"114","fix":"115"},{"desc":"116","fix":"117"},{"desc":"118","fix":"119"},{"desc":"120","fix":"121"},{"desc":"122","fix":"123"},"Update the dependencies array to be: [getAssociation]",{"range":"124","text":"125"},"Update the dependencies array to be: [association, endPage, index, pagePlace]",{"range":"126","text":"127"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"128","text":"129"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"130","text":"131"},"Update the dependencies array to be: [getBookmark]",{"range":"132","text":"133"},[1976,1978],"[getAssociation]",[2377,2397],"[association, endPage, index, pagePlace]",[2976,2983],"[getAssociation, props.history, search, state]",[1942,1944],"[getReview, infiniteScroll]",[2279,2281],"[getBookmark]"]