Commit f66c99af authored by baesangjune's avatar baesangjune
Browse files

수정

parent 862b8127
[{"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\\Components\\Login.js":"7","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js":"8","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js":"9","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js":"10"},{"size":1339,"mtime":1612133560398,"results":"11","hashOfConfig":"12"},{"size":375,"mtime":1611254909401,"results":"13","hashOfConfig":"12"},{"size":3725,"mtime":1612133560393,"results":"14","hashOfConfig":"12"},{"size":8433,"mtime":1612154572467,"results":"15","hashOfConfig":"12"},{"size":4773,"mtime":1612146987427,"results":"16","hashOfConfig":"12"},{"size":438,"mtime":1612133560394,"results":"17","hashOfConfig":"12"},{"size":3150,"mtime":1612140232971,"results":"18","hashOfConfig":"12"},{"size":2959,"mtime":1612133560395,"results":"19","hashOfConfig":"12"},{"size":6367,"mtime":1612154452722,"results":"20","hashOfConfig":"12"},{"size":766,"mtime":1612140214129,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},"13y9yvi",{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",[],["43","44"],"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",["45","46","47","48","49","50","51"],"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\\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",["52","53","54","55","56"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js",[],{"ruleId":"57","replacedBy":"58"},{"ruleId":"59","replacedBy":"60"},{"ruleId":"61","severity":1,"message":"62","line":4,"column":83,"nodeType":"63","messageId":"64","endLine":4,"endColumn":86},{"ruleId":"61","severity":1,"message":"65","line":22,"column":12,"nodeType":"63","messageId":"64","endLine":22,"endColumn":17},{"ruleId":"61","severity":1,"message":"66","line":24,"column":20,"nodeType":"63","messageId":"64","endLine":24,"endColumn":31},{"ruleId":"61","severity":1,"message":"67","line":26,"column":19,"nodeType":"63","messageId":"64","endLine":26,"endColumn":27},{"ruleId":"68","severity":1,"message":"69","line":48,"column":8,"nodeType":"70","endLine":48,"endColumn":10,"suggestions":"71"},{"ruleId":"68","severity":1,"message":"72","line":74,"column":8,"nodeType":"70","endLine":74,"endColumn":15,"suggestions":"73"},{"ruleId":"74","severity":1,"message":"75","line":146,"column":35,"nodeType":"76","endLine":146,"endColumn":76},{"ruleId":"61","severity":1,"message":"77","line":1,"column":10,"nodeType":"78","messageId":"64","endLine":1,"endColumn":15},{"ruleId":"61","severity":1,"message":"79","line":4,"column":21,"nodeType":"63","messageId":"64","endLine":4,"endColumn":24},{"ruleId":"61","severity":1,"message":"80","line":4,"column":26,"nodeType":"63","messageId":"64","endLine":4,"endColumn":32},{"ruleId":"68","severity":1,"message":"81","line":55,"column":6,"nodeType":"70","endLine":55,"endColumn":8,"suggestions":"82"},{"ruleId":"83","severity":1,"message":"84","line":134,"column":11,"nodeType":"85","endLine":134,"endColumn":23},"no-native-reassign",["86"],"no-negated-in-lhs",["87"],"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",["88"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["89"],"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.",["90"],"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","no-global-assign","no-unsafe-negation",{"desc":"91","fix":"92"},{"desc":"93","fix":"94"},{"desc":"95","fix":"96"},"Update the dependencies array to be: [getAssociation]",{"range":"97","text":"98"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"99","text":"100"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"101","text":"102"},[1853,1855],"[getAssociation]",[2762,2769],"[getAssociation, props.history, search, state]",[1829,1831],"[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\\Components\\Login.js":"7","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js":"8","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js":"9","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js":"10","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Bookmark.js":"11"},{"size":1345,"mtime":1612156521448,"results":"12","hashOfConfig":"13"},{"size":375,"mtime":1611254909401,"results":"14","hashOfConfig":"13"},{"size":3725,"mtime":1612133560393,"results":"15","hashOfConfig":"13"},{"size":8402,"mtime":1612273942838,"results":"16","hashOfConfig":"13"},{"size":4731,"mtime":1612156511931,"results":"17","hashOfConfig":"13"},{"size":438,"mtime":1612133560394,"results":"18","hashOfConfig":"13"},{"size":3150,"mtime":1612140232971,"results":"19","hashOfConfig":"13"},{"size":2959,"mtime":1612133560395,"results":"20","hashOfConfig":"13"},{"size":6289,"mtime":1612273230443,"results":"21","hashOfConfig":"13"},{"size":766,"mtime":1612140214129,"results":"22","hashOfConfig":"13"},{"size":5351,"mtime":1612273874666,"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,"usedDeprecatedRules":"26"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"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\\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",["56","57","58"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\utils\\auth.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Bookmark.js",["59"],{"ruleId":"60","replacedBy":"61"},{"ruleId":"62","replacedBy":"63"},{"ruleId":"64","severity":1,"message":"65","line":4,"column":83,"nodeType":"66","messageId":"67","endLine":4,"endColumn":86},{"ruleId":"64","severity":1,"message":"68","line":21,"column":12,"nodeType":"66","messageId":"67","endLine":21,"endColumn":17},{"ruleId":"64","severity":1,"message":"69","line":25,"column":20,"nodeType":"66","messageId":"67","endLine":25,"endColumn":31},{"ruleId":"64","severity":1,"message":"70","line":27,"column":19,"nodeType":"66","messageId":"67","endLine":27,"endColumn":27},{"ruleId":"71","severity":1,"message":"72","line":49,"column":8,"nodeType":"73","endLine":49,"endColumn":10,"suggestions":"74"},{"ruleId":"71","severity":1,"message":"75","line":75,"column":8,"nodeType":"73","endLine":75,"endColumn":15,"suggestions":"76"},{"ruleId":"77","severity":1,"message":"78","line":147,"column":35,"nodeType":"79","endLine":147,"endColumn":76},{"ruleId":"64","severity":1,"message":"80","line":1,"column":10,"nodeType":"81","messageId":"67","endLine":1,"endColumn":15},{"ruleId":"71","severity":1,"message":"82","line":54,"column":6,"nodeType":"73","endLine":54,"endColumn":8,"suggestions":"83"},{"ruleId":"84","severity":1,"message":"85","line":133,"column":11,"nodeType":"86","endLine":133,"endColumn":23},{"ruleId":"71","severity":1,"message":"87","line":66,"column":8,"nodeType":"73","endLine":66,"endColumn":18,"suggestions":"88"},"no-native-reassign",["89"],"no-negated-in-lhs",["90"],"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",["91"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["92"],"react/jsx-no-duplicate-props","No duplicate props allowed","JSXAttribute","'kakao' is defined but never used.","Program","React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["93"],"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","React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array.",["94"],"no-global-assign","no-unsafe-negation",{"desc":"95","fix":"96"},{"desc":"97","fix":"98"},{"desc":"99","fix":"100"},{"desc":"101","fix":"102"},"Update the dependencies array to be: [getAssociation]",{"range":"103","text":"104"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"105","text":"106"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"107","text":"108"},"Update the dependencies array to be: [bookmark, getBookmark]",{"range":"109","text":"110"},[1863,1865],"[getAssociation]",[2772,2779],"[getAssociation, props.history, search, state]",[1808,1810],"[getReview, infiniteScroll]",[2333,2343],"[bookmark, getBookmark]"]
\ No newline at end of file
import React, { useState, useEffect } from 'react';
import { Link, Redirect } from 'react-router-dom';
import ohuh from '../ohuh.PNG';
import ohuh from '../ohuh-sm.PNG';
import { Container, Row, Form, Image, InputGroup, Button, Col, Card, Nav } from 'react-bootstrap';
import axios from 'axios';
import { handleLogout, isAuthenticated } from '../utils/auth.js'
......@@ -66,9 +66,7 @@ function App() {
<Nav.Link href='/bookmark'>북마크</Nav.Link>
</Nav>
<Row className="justify-content-center" md={2}>
<Col className="d-flex justify-content-center">
<Image src={ohuh} style={{ margin: "3%", marginTop : "3%" }} fluid />
</Col>
<Image src={ohuh} style={{ margin: "3%", marginTop : "5%" }} fluid />
</Row>
<Row style={{ marginBottom: "5%" }}>
<Form className="vw-100" onSubmit={handleSubmit}>
......@@ -88,7 +86,7 @@ function App() {
</Row>
<Row xs={6}>
<Col md={6} xs={12}>
<h1 className=" d-flex justify-content-center" style={{ marginBottom: "7%" }}>인기관광지</h1>
<h1 className=" d-flex justify-content-center" style={{ marginBottom: "7%" ,marginTop:"30%" }}>인기관광지</h1>
<Card align="center" border="info" style={{ margin: "3%" }}>
<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} />
......@@ -103,7 +101,7 @@ function App() {
</Col>
<Col md={6} xs={12}>
<h1 className=" d-flex justify-content-center" style={{ marginBottom: "7%" }}>최근 검색관광지</h1>
<h1 className=" d-flex justify-content-center" style={{ marginBottom: "7%",marginTop:"30%" }}>최근 검색관광지</h1>
<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} />
......
import React, { useState, useEffect } from 'react'
import { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar, Image } from "react-bootstrap"
import { Col, Card, Container, Row, Button, Nav, Navbar, Image } from "react-bootstrap"
import axios from "axios"
import ohuh from '../ohuh-sm.PNG';
import catchErrors from '../utils/catchErrors.js'
import { isAuthenticated } from '../utils/auth'
import * as Icon from 'react-bootstrap-icons';
import { Link, Redirect } from 'react-router-dom';
import { Link } from 'react-router-dom';
const INIT_PAGE = {
bookmark: []
}
function Bookmark() {
const [page, setPage] = useState(INIT_PAGE)
const [index, setIndex] = useState(1);
const [error, setError] = useState('')
const [state, setState] = useState(false);
const [bookmark, setBookmark] = useState([true, true, true, true])
const [bookmark, setBookmark] = useState([])
const [pagePlace, setPagePlace] = useState([])
const [showSet, setShowSet] = useState([false, false, false, false]);
const user = isAuthenticated()
async function getBookmark() {
try {
console.log("bookmarkArr 까지는 온다.")
const bookmarkArr = [];
const response = await axios.get(`/api/users/bookmark?ID=${user}`)
setPagePlace(response.data.bookmark)
} catch (error) {
catchErrors(error, setError)
for (let a = 0; a < pagePlace.length; a++) {
bookmarkArr.push(true)
}
setBookmark(bookmarkArr)
console.log("bookmarkArr=",bookmarkArr)
} catch (err) {
catchErrors(err, setError(err))
console.log("북마크에러", error)
}
}
......@@ -62,12 +63,12 @@ function Bookmark() {
}
useEffect(() => {
getBookmark()
}, [])
}, [bookmark])
return (
<Container>
<Link to="/" className="d-flex justify-content-center">
<Link to="/" >
<Image style={{ margin: "1%" }} src={ohuh} />
</Link>
<Navbar bg="info" variant="dark">
......@@ -86,7 +87,7 @@ function Bookmark() {
<Card.Header className="d-flex justify-content-center" style={{ margin: "0", fontSize: '200%', fontWeight: 'bold' }} >{place.name}
{user ?
<Button
variant={bookmark[index] ? "primary" : "light"}
variant={bookmark[index] ? "info" : "light"}
onClick={() => handleBookmark(index, place)}>
<Icon.BookmarkStarFill size={35} />
{console.log("bookmark", bookmark)}
......
/*global kakao*/
import axios from 'axios';
import React, { useEffect, useState } from 'react';
import { Container, Row, Button, Image, } from 'react-bootstrap';
import { Container, Image } from 'react-bootstrap';
import queryString from 'query-string'
import { Link } from 'react-bootstrap-icons';
import ohuh from '../ohuh-sm.PNG';
import { Link } from 'react-router-dom';
function Place(props) {
console.log(props)
......@@ -74,11 +74,11 @@ function Place(props) {
return (
<Container>
<Link to="/" className="d-flex justify-content-center"><Image style={{ margin: "1%" }} src={ohuh} /></Link>
<Link to="/" >
<Image style={{ margin: "1%" }} src={ohuh} />
</Link>
<div class="d-flex align-items-center p-3 my-3 text-white bg-info rounded shadow-sm">
<div >
<h1 class="h6 mb-0 text-white">{place}</h1>
</div>
<h1 class="h6 mb-0 text-white">{place}</h1>
</div>
<div class="my-3 p-3 bg-white rounded shadow-sm">
......
......@@ -15,12 +15,13 @@ function Search(props) {
const [index, setIndex] = useState(1);
const [search, setSearch] = useState(queryString.parse(props.location.search).keyword);
const [bookmark, setBookmark] = useState([false, false, false, false])
const user = isAuthenticated()
const [association, setAssociation] = useState([{ name: " ", address: " ", img: " " }])
const [pagePlace, setPagePlace] = useState([{ name: " ", address: " ", img: " " }, { name: " ", address: " ", img: " " }])
const [endPage, setEndPage] = useState(1)
const [error, setError] = useState('')
const user = isAuthenticated()
async function getBookmark() {
try {
const response = await axios.get(`/api/users/bookmark?ID=${user}`)
......@@ -142,7 +143,7 @@ function Search(props) {
}
return (
<Container >
<Link to="/" className="d-flex justify-content-center"><Image src={ohuh} /></Link>
<Link to="/" ><Image src={ohuh} /></Link>
<Row className="mb-2" className="d-flex justify-content-center">
<Form style={{ width: "90vw" }} onSubmit={handleSubmit}>
<InputGroup size="lg">
......
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