Commit cbc36f50 authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

Merge remote-tracking branch 'origin/BAE' into lsy

parents 5cc48ff1 c7df9b76
......@@ -84,7 +84,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"}
......@@ -92,7 +92,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" }} >
......
......@@ -54,15 +54,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>
: (
......@@ -73,8 +66,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}>
......@@ -92,11 +87,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" }} >
......@@ -108,10 +103,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" }} >
......
......@@ -14,7 +14,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()
......@@ -28,7 +27,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))
}
}
......@@ -114,7 +113,6 @@ function Search(props) {
console.log("뿌릴 data22222222222222222", page)
return page
}
//usestate 쓰거나 한번에 useeffect에 넣기
async function handlebookmark(index) {
if (!bookmark[index]) {
......@@ -148,7 +146,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">
......@@ -165,23 +163,25 @@ function Search(props) {
</InputGroup>
</Form>
</Row>
{/* {time.toLocaleString()} */}
{time.toLocaleString()}
<Row className="d-flex flex-wrap">
{console.log("#####################33", pagePlace)}
{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}
<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} />
</Button> : null}
</Card.Title>
{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