\r\n \r\n \r\n {place.name}\r\n {user ?\r\n : null}\r\n \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\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",["57","58","59","60","61","62","63","64","65"],"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",["66"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js",[],{"ruleId":"67","replacedBy":"68"},{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","severity":1,"message":"72","line":4,"column":83,"nodeType":"73","messageId":"74","endLine":4,"endColumn":86},{"ruleId":"71","severity":1,"message":"75","line":22,"column":12,"nodeType":"73","messageId":"74","endLine":22,"endColumn":17},{"ruleId":"71","severity":1,"message":"76","line":24,"column":20,"nodeType":"73","messageId":"74","endLine":24,"endColumn":31},{"ruleId":"71","severity":1,"message":"77","line":26,"column":19,"nodeType":"73","messageId":"74","endLine":26,"endColumn":27},{"ruleId":"78","severity":1,"message":"79","line":48,"column":8,"nodeType":"80","endLine":48,"endColumn":10,"suggestions":"81"},{"ruleId":"78","severity":1,"message":"82","line":74,"column":8,"nodeType":"80","endLine":74,"endColumn":15,"suggestions":"83"},{"ruleId":"84","severity":1,"message":"85","line":149,"column":35,"nodeType":"86","endLine":149,"endColumn":76},{"ruleId":"71","severity":1,"message":"87","line":17,"column":12,"nodeType":"73","messageId":"74","endLine":17,"endColumn":16},{"ruleId":"71","severity":1,"message":"88","line":17,"column":18,"nodeType":"73","messageId":"74","endLine":17,"endColumn":25},{"ruleId":"71","severity":1,"message":"89","line":18,"column":12,"nodeType":"73","messageId":"74","endLine":18,"endColumn":17},{"ruleId":"71","severity":1,"message":"90","line":18,"column":19,"nodeType":"73","messageId":"74","endLine":18,"endColumn":27},{"ruleId":"71","severity":1,"message":"75","line":19,"column":12,"nodeType":"73","messageId":"74","endLine":19,"endColumn":17},{"ruleId":"71","severity":1,"message":"91","line":20,"column":12,"nodeType":"73","messageId":"74","endLine":20,"endColumn":17},{"ruleId":"71","severity":1,"message":"92","line":20,"column":19,"nodeType":"73","messageId":"74","endLine":20,"endColumn":27},{"ruleId":"71","severity":1,"message":"93","line":23,"column":12,"nodeType":"73","messageId":"74","endLine":23,"endColumn":19},{"ruleId":"78","severity":1,"message":"94","line":65,"column":8,"nodeType":"80","endLine":65,"endColumn":10,"suggestions":"95"},{"ruleId":"78","severity":1,"message":"96","line":36,"column":6,"nodeType":"80","endLine":36,"endColumn":8,"suggestions":"97"},"no-native-reassign",["98"],"no-negated-in-lhs",["99"],"no-unused-vars","'Nav' is defined but never used.","Identifier","unusedVar","'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",["100"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["101"],"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.","'showSet' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array.",["102"],"React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["103"],"no-global-assign","no-unsafe-negation",{"desc":"104","fix":"105"},{"desc":"106","fix":"107"},{"desc":"108","fix":"109"},{"desc":"110","fix":"111"},"Update the dependencies array to be: [getAssociation]",{"range":"112","text":"113"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"114","text":"115"},"Update the dependencies array to be: [getBookmark]",{"range":"116","text":"117"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"118","text":"119"},[1853,1855],"[getAssociation]",[2762,2769],"[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":8447,"mtime":1612152686729,"results":"16","hashOfConfig":"13"},{"size":4773,"mtime":1612146987427,"results":"17","hashOfConfig":"13"},{"size":438,"mtime":1612133560394,"results":"18","hashOfConfig":"13"},{"size":5312,"mtime":1612147636744,"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":7,"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":10,"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"],"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",["56","57","58","59","60","61","62","63","64","65"],"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",["66"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js",[],{"ruleId":"67","replacedBy":"68"},{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","severity":1,"message":"72","line":4,"column":83,"nodeType":"73","messageId":"74","endLine":4,"endColumn":86},{"ruleId":"71","severity":1,"message":"75","line":22,"column":12,"nodeType":"73","messageId":"74","endLine":22,"endColumn":17},{"ruleId":"71","severity":1,"message":"76","line":24,"column":20,"nodeType":"73","messageId":"74","endLine":24,"endColumn":31},{"ruleId":"71","severity":1,"message":"77","line":26,"column":19,"nodeType":"73","messageId":"74","endLine":26,"endColumn":27},{"ruleId":"78","severity":1,"message":"79","line":48,"column":8,"nodeType":"80","endLine":48,"endColumn":10,"suggestions":"81"},{"ruleId":"78","severity":1,"message":"82","line":74,"column":8,"nodeType":"80","endLine":74,"endColumn":15,"suggestions":"83"},{"ruleId":"84","severity":1,"message":"85","line":146,"column":35,"nodeType":"86","endLine":146,"endColumn":76},{"ruleId":"71","severity":1,"message":"87","line":17,"column":12,"nodeType":"73","messageId":"74","endLine":17,"endColumn":16},{"ruleId":"71","severity":1,"message":"88","line":17,"column":18,"nodeType":"73","messageId":"74","endLine":17,"endColumn":25},{"ruleId":"71","severity":1,"message":"89","line":18,"column":12,"nodeType":"73","messageId":"74","endLine":18,"endColumn":17},{"ruleId":"71","severity":1,"message":"90","line":18,"column":19,"nodeType":"73","messageId":"74","endLine":18,"endColumn":27},{"ruleId":"71","severity":1,"message":"75","line":19,"column":12,"nodeType":"73","messageId":"74","endLine":19,"endColumn":17},{"ruleId":"71","severity":1,"message":"91","line":20,"column":12,"nodeType":"73","messageId":"74","endLine":20,"endColumn":17},{"ruleId":"71","severity":1,"message":"92","line":20,"column":19,"nodeType":"73","messageId":"74","endLine":20,"endColumn":27},{"ruleId":"71","severity":1,"message":"93","line":23,"column":12,"nodeType":"73","messageId":"74","endLine":23,"endColumn":19},{"ruleId":"71","severity":1,"message":"94","line":23,"column":21,"nodeType":"73","messageId":"74","endLine":23,"endColumn":31},{"ruleId":"78","severity":1,"message":"95","line":65,"column":8,"nodeType":"80","endLine":65,"endColumn":10,"suggestions":"96"},{"ruleId":"78","severity":1,"message":"97","line":36,"column":6,"nodeType":"80","endLine":36,"endColumn":8,"suggestions":"98"},"no-native-reassign",["99"],"no-negated-in-lhs",["100"],"no-unused-vars","'Nav' is defined but never used.","Identifier","unusedVar","'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",["101"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["102"],"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.","'showSet' is assigned a value but never used.","'setShowSet' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array.",["103"],"React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["104"],"no-global-assign","no-unsafe-negation",{"desc":"105","fix":"106"},{"desc":"107","fix":"108"},{"desc":"109","fix":"110"},{"desc":"111","fix":"112"},"Update the dependencies array to be: [getAssociation]",{"range":"113","text":"114"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"115","text":"116"},"Update the dependencies array to be: [getBookmark]",{"range":"117","text":"118"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"119","text":"120"},[1853,1855],"[getAssociation]",[2762,2769],"[getAssociation, props.history, search, state]",[2278,2280],"[getBookmark]",[1178,1180],"[getReview, infiniteScroll]"]
\ No newline at end of file
diff --git a/client/src/Bookmark.js b/client/src/Bookmark.js
index c5f52256be089509b5c8656aeba551c7c29180f0..494cff89f12c8bdf84fce091e27dcb7fff2fdfe4 100644
--- a/client/src/Bookmark.js
+++ b/client/src/Bookmark.js
@@ -18,7 +18,7 @@ function Bookmark() {
const [index, setIndex] = useState(1);
const [error, setError] = useState('')
const [state, setState] = useState(false);
- const [bookmark, setBookmark] = useState([false, false, false, false])
+ const [bookmark, setBookmark] = useState([true, true, true, true])
const [pagePlace, setPagePlace] = useState([])
const [showSet, setShowSet] = useState([false, false, false, false]);
@@ -49,7 +49,7 @@ function Bookmark() {
}
} else {
try {
- const response = await axios.delete(`/api/users/bookmark?ID=${user}`)
+ const response = await axios.delete(`/api/users/bookmark?ID=${user}&place=${pagePlace[index]._id}`)
alert(response.data, '저장된 북마크가 삭제되었습니다.')
const showArr = bookmark
showArr[index] = false
@@ -68,7 +68,7 @@ function Bookmark() {
return (
-
+ 북마크
@@ -96,12 +96,9 @@ function Bookmark() {
{place.address}
-
- {/* setShowSet([false, false, false, false])} /> */}
+
+
+
diff --git a/client/src/Pages/App.js b/client/src/Pages/App.js
index f6b1cc944b5a4aef46ef69691a31ee759b5bb699..ef4f143c5fcefa6023498c7207fcb7e03f360039 100644
--- a/client/src/Pages/App.js
+++ b/client/src/Pages/App.js
@@ -96,7 +96,7 @@ function App() {
{recommend.address}
-
+
@@ -111,7 +111,7 @@ function App() {
{latest.address}
-
+
diff --git a/client/src/Pages/Search.js b/client/src/Pages/Search.js
index f5549ccd67feaec169cbdc77c8dc4b017b439f19..b05ff346d9776bc1381bae67113dab5e9e74cf86 100644
--- a/client/src/Pages/Search.js
+++ b/client/src/Pages/Search.js
@@ -100,6 +100,7 @@ function Search(props) {
e.preventDefault()
setState(true)
setIndex(1)
+ setBookmark([false, false, false, false])
}
function paginate(items, pageNumber, itemNumber) {
@@ -139,13 +140,9 @@ function Search(props) {
}
}
}
-
-
- let time = new Date()
-
return (
-
+
- {time.toLocaleString()}
{console.log("#####################33", pagePlace)}
@@ -170,15 +166,16 @@ function Search(props) {
return (