Commit c7df9b76 authored by baesangjune's avatar baesangjune
Browse files

북마크 문제 발견

parent b9552a52
This diff is collapsed.
......@@ -83,7 +83,7 @@ function Bookmark() {
<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}
<Card.Header className="d-flex justify-content-center" style={{ margin: "0", fontSize: '200%', fontWeight: 'bold' }} >{place.name}
{user ?
<Button
variant={bookmark[index] ? "primary" : "light"}
......@@ -91,7 +91,7 @@ function Bookmark() {
<Icon.BookmarkStarFill size={35} />
{console.log("bookmark", bookmark)}
{console.log("bookmark[index]", bookmark[index])}</Button> : null}
</Card.Title>
</Card.Header>
<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" }} >
......
......@@ -13,7 +13,6 @@ function Search(props) {
const [state, setState] = useState(false);
const [index, setIndex] = useState(1);
const [showSet, setShowSet] = useState([false, false, false, false]);
const [search, setSearch] = useState(queryString.parse(props.location.search).keyword);
const [bookmark, setBookmark] = useState([false, false, false, false])
const user = isAuthenticated()
......@@ -27,7 +26,7 @@ function Search(props) {
const response = await axios.get(`/api/users/bookmark?ID=${user}`)
// setBookmark(response.data.bookmark)
} catch (error) {
catchErrors(error, setError)
catchErrors(error, setError(error))
}
}
......@@ -113,7 +112,6 @@ function Search(props) {
console.log("뿌릴 data22222222222222222", page)
return page
}
//usestate 쓰거나 한번에 useeffect에 넣기
async function handlebookmark(index) {
if (!bookmark[index]) {
......@@ -147,7 +145,7 @@ function Search(props) {
return (
<Container >
<Link to="/" className="d-flex justify-content-center"><Image src={ohuh} /></Link>
<Link to="/" className="d-flex justify-content-center" ><Image src={ohuh} /></Link>
<Row className="mb-2" className="d-flex justify-content-center">
<Form style={{ width: "90vw" }} onSubmit={handleSubmit}>
<InputGroup size="lg">
......@@ -164,7 +162,7 @@ function Search(props) {
</InputGroup>
</Form>
</Row>
{/* {time.toLocaleString()} */}
{time.toLocaleString()}
<Row className="d-flex flex-wrap">
{console.log("#####################33", pagePlace)}
......
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