Commit 754acc13 authored by baesangjune's avatar baesangjune
Browse files

머지완료 및 수정사항, 디버깅

parent bc54f42c
[{"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\\Place.js":"3","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js":"4","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js":"5","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js":"6"},{"size":939,"mtime":1611497444385,"results":"7","hashOfConfig":"8"},{"size":375,"mtime":1611254909401,"results":"9","hashOfConfig":"8"},{"size":1624,"mtime":1611724576486,"results":"10","hashOfConfig":"8"},{"size":3724,"mtime":1611712847775,"results":"11","hashOfConfig":"8"},{"size":7880,"mtime":1611732726663,"results":"12","hashOfConfig":"8"},{"size":4190,"mtime":1611732347337,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"16"},"13y9yvi",{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"21"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",["28"],"import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\nimport App from './Pages/App';\r\nimport Search from './Pages/Search';\r\nimport axios from 'axios';\r\nimport reportWebVitals from './reportWebVitals';\r\nimport {\r\n BrowserRouter as Router,\r\n Switch,\r\n Route,\r\n Redirect,\r\n} from \"react-router-dom\";\r\n\r\nReactDOM.render(\r\n <React.StrictMode>\r\n <Router>\r\n <Switch>\r\n <Route exact path=\"/\" component={App} />\r\n <Route path=\"/search\" component={Search} />\r\n <Redirect path=\"/search\" to=\"/search\" />\r\n </Switch>\r\n </Router>\r\n </React.StrictMode>,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Place.js",["29","30"],"import axios from 'axios';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Modal, Container, Row, Button, } from 'react-bootstrap';\r\n\r\nfunction Place(props) {\r\n const [reviews, setReviews] = useState()\r\n const [db, setDb] = useState(false)\r\n const getReview = () => {\r\n axios({ url: `/api/review?keyword=${props.place.name}`, method: 'post', data: { db: db } })\r\n .then(res => {\r\n console.log(\"place res.data\", res.data)\r\n setReviews(res.data)\r\n })\r\n .catch(err => {\r\n console.log(err)\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n getReview();\r\n }, [])\r\n\r\n return (\r\n <Modal {...props}\r\n size=\"xl\"\r\n keyboard=\"true\"\r\n variant=\"backdrop.in\"\r\n aria-labelledby=\"example-modal-sizes-title-lg\">\r\n <Modal.Header closeButton>\r\n <Modal.Title id=\"contained-modal-title-vcenter\" style={{ fontSize: '40px' }}>\r\n {props.place.name}\r\n </Modal.Title>\r\n </Modal.Header>\r\n <Modal.Body className=\"show-grid\">\r\n <Container style={{ fontSize: '40px' }}>\r\n {Array.isArray(reviews) ? reviews.map((review) => {\r\n return (\r\n <Row className=\"mt-4\">\r\n <a href={review.link}>{review.title}</a>\r\n <div>{review.summary}</div>\r\n <div>{review.content}</div>\r\n </Row>\r\n )\r\n })\r\n : \"리뷰가 없습니다.\"}\r\n </Container>\r\n\r\n </Modal.Body>\r\n <Modal.Footer>\r\n <Button block onClick={props.onHide}>Close</Button>\r\n </Modal.Footer>\r\n </Modal>\r\n );\r\n}\r\n\r\nexport default Place;\r\n","C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Paginations.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Search.js",["31","32","33","34","35","36"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\App.js",[],{"ruleId":"37","severity":1,"message":"38","line":7,"column":8,"nodeType":"39","messageId":"40","endLine":7,"endColumn":13},{"ruleId":"37","severity":1,"message":"41","line":7,"column":14,"nodeType":"39","messageId":"40","endLine":7,"endColumn":19},{"ruleId":"42","severity":1,"message":"43","line":21,"column":6,"nodeType":"44","endLine":21,"endColumn":8,"suggestions":"45"},{"ruleId":"37","severity":1,"message":"46","line":16,"column":12,"nodeType":"39","messageId":"40","endLine":16,"endColumn":18},{"ruleId":"42","severity":1,"message":"47","line":44,"column":8,"nodeType":"44","endLine":44,"endColumn":10,"suggestions":"48"},{"ruleId":"42","severity":1,"message":"49","line":65,"column":8,"nodeType":"44","endLine":65,"endColumn":15,"suggestions":"50"},{"ruleId":"37","severity":1,"message":"51","line":68,"column":11,"nodeType":"39","messageId":"40","endLine":68,"endColumn":17},{"ruleId":"37","severity":1,"message":"52","line":133,"column":9,"nodeType":"39","messageId":"40","endLine":133,"endColumn":13},{"ruleId":"53","severity":1,"message":"54","line":138,"column":35,"nodeType":"55","endLine":138,"endColumn":76},"no-unused-vars","'axios' is defined but never used.","Identifier","unusedVar","'setDb' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getReview'. Either include it or remove the dependency array.","ArrayExpression",["56"],"'mobile' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'getAssociation'. Either include it or remove the dependency array.",["57"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["58"],"'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",{"desc":"59","fix":"60"},{"desc":"61","fix":"62"},{"desc":"63","fix":"64"},"Update the dependencies array to be: [getReview]",{"range":"65","text":"66"},"Update the dependencies array to be: [getAssociation]",{"range":"67","text":"68"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"69","text":"70"},[605,607],"[getReview]",[1563,1565],"[getAssociation]",[2123,2130],"[getAssociation, props.history, search, state]"]
[{"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"},{"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":8409,"mtime":1612135856710,"results":"15","hashOfConfig":"12"},{"size":4920,"mtime":1612136347104,"results":"16","hashOfConfig":"12"},{"size":438,"mtime":1612133560394,"results":"17","hashOfConfig":"12"},{"size":5573,"mtime":1612136236838,"results":"18","hashOfConfig":"12"},{"size":3147,"mtime":1612133560391,"results":"19","hashOfConfig":"12"},{"size":2959,"mtime":1612133560395,"results":"20","hashOfConfig":"12"},{"size":2146,"mtime":1612133560397,"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":10,"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":9,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\index.js",[],["44","45"],"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",["46","47","48","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"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Login.js",[],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Components\\Signup.js",[],["65","66"],"C:\\Users\\노트북펜\\Desktop\\2021YDK\\search-page\\client\\src\\Pages\\Place.js",["67","68"],{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","severity":1,"message":"74","line":4,"column":83,"nodeType":"75","messageId":"76","endLine":4,"endColumn":86},{"ruleId":"73","severity":1,"message":"77","line":16,"column":12,"nodeType":"75","messageId":"76","endLine":16,"endColumn":19},{"ruleId":"73","severity":1,"message":"78","line":16,"column":21,"nodeType":"75","messageId":"76","endLine":16,"endColumn":31},{"ruleId":"73","severity":1,"message":"79","line":23,"column":12,"nodeType":"75","messageId":"76","endLine":23,"endColumn":17},{"ruleId":"73","severity":1,"message":"80","line":25,"column":20,"nodeType":"75","messageId":"76","endLine":25,"endColumn":31},{"ruleId":"73","severity":1,"message":"81","line":27,"column":19,"nodeType":"75","messageId":"76","endLine":27,"endColumn":27},{"ruleId":"82","severity":1,"message":"83","line":49,"column":8,"nodeType":"84","endLine":49,"endColumn":10,"suggestions":"85"},{"ruleId":"82","severity":1,"message":"86","line":75,"column":8,"nodeType":"84","endLine":75,"endColumn":15,"suggestions":"87"},{"ruleId":"73","severity":1,"message":"88","line":146,"column":9,"nodeType":"75","messageId":"76","endLine":146,"endColumn":13},{"ruleId":"89","severity":1,"message":"90","line":151,"column":35,"nodeType":"91","endLine":151,"endColumn":76},{"ruleId":"73","severity":1,"message":"92","line":17,"column":12,"nodeType":"75","messageId":"76","endLine":17,"endColumn":16},{"ruleId":"73","severity":1,"message":"93","line":17,"column":18,"nodeType":"75","messageId":"76","endLine":17,"endColumn":25},{"ruleId":"73","severity":1,"message":"94","line":18,"column":12,"nodeType":"75","messageId":"76","endLine":18,"endColumn":17},{"ruleId":"73","severity":1,"message":"95","line":18,"column":19,"nodeType":"75","messageId":"76","endLine":18,"endColumn":27},{"ruleId":"73","severity":1,"message":"79","line":19,"column":12,"nodeType":"75","messageId":"76","endLine":19,"endColumn":17},{"ruleId":"73","severity":1,"message":"96","line":20,"column":12,"nodeType":"75","messageId":"76","endLine":20,"endColumn":17},{"ruleId":"73","severity":1,"message":"97","line":20,"column":19,"nodeType":"75","messageId":"76","endLine":20,"endColumn":27},{"ruleId":"73","severity":1,"message":"77","line":23,"column":12,"nodeType":"75","messageId":"76","endLine":23,"endColumn":19},{"ruleId":"82","severity":1,"message":"98","line":65,"column":8,"nodeType":"84","endLine":65,"endColumn":10,"suggestions":"99"},{"ruleId":"69","replacedBy":"100"},{"ruleId":"71","replacedBy":"101"},{"ruleId":"73","severity":1,"message":"102","line":3,"column":26,"nodeType":"75","messageId":"76","endLine":3,"endColumn":32},{"ruleId":"82","severity":1,"message":"103","line":34,"column":6,"nodeType":"84","endLine":34,"endColumn":8,"suggestions":"104"},"no-native-reassign",["105"],"no-negated-in-lhs",["106"],"no-unused-vars","'Nav' is defined but never used.","Identifier","unusedVar","'showSet' is assigned a value but never used.","'setShowSet' 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",["107"],"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array.",["108"],"'time' is assigned a value but never used.","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.","React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array.",["109"],["105"],["106"],"'Button' is defined but never used.","React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array.",["110"],"no-global-assign","no-unsafe-negation",{"desc":"111","fix":"112"},{"desc":"113","fix":"114"},{"desc":"115","fix":"116"},{"desc":"117","fix":"118"},"Update the dependencies array to be: [getAssociation]",{"range":"119","text":"120"},"Update the dependencies array to be: [getAssociation, props.history, search, state]",{"range":"121","text":"122"},"Update the dependencies array to be: [getBookmark]",{"range":"123","text":"124"},"Update the dependencies array to be: [getReview, infiniteScroll]",{"range":"125","text":"126"},[1921,1923],"[getAssociation]",[2830,2837],"[getAssociation, props.history, search, state]",[2252,2254],"[getBookmark]",[1102,1104],"[getReview, infiniteScroll]"]
\ No newline at end of file
......@@ -7076,6 +7076,11 @@
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw=="
},
"icons": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/icons/-/icons-1.0.0.tgz",
"integrity": "sha512-7POum3AHKovjEEXg4ITL2opTzGjnN2UnUIhv5LsUX+SjKBsFMjRyANShrCubt0KQdNdcX2wAym+JXOt6LceuYA=="
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
......@@ -11222,6 +11227,14 @@
"warning": "^4.0.3"
}
},
"react-bootstrap-icons": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/react-bootstrap-icons/-/react-bootstrap-icons-1.3.0.tgz",
"integrity": "sha512-84ne6JNYd/aT4/lk9IT23YmPdat7RrBFuf1rSIdrufX5bAkVzDPqNUkLS1gZqylZIzjjKJvIevLHLGYaMCo7Ig==",
"requires": {
"prop-types": "^15.7.2"
}
},
"react-dev-utils": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.1.tgz",
......
......@@ -7,8 +7,10 @@
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^4.5.3",
"icons": "^1.0.0",
"react": "^17.0.1",
"react-bootstrap": "^1.4.0",
"react-bootstrap-icons": "^1.3.0",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
......@@ -38,5 +40,5 @@
"last 1 safari version"
]
},
"proxy":"http://localhost:3001"
"proxy": "http://localhost:3001"
}
import React, { useState, useEffect } from 'react'
import { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar } from "react-bootstrap"
import { Col, Card, Container, Row, Button, Nav, Navbar, Image } from "react-bootstrap"
import axios from "axios"
import catchErrors from './utils/catchErrors.js'
import { isAuthenticated } from './utils/auth'
import * as Icon from 'react-bootstrap-icons';
import Place from './Components/Place.js'
import { Link } from 'react-router-dom'
import ohuh from './ohuh-sm.PNG';
const INIT_PAGE = {
......@@ -66,6 +67,9 @@ function Bookmark() {
return (
<Container>
<Link to="/" className="d-flex justify-content-center">
<Image style={{margin:"1%"}} src={ohuh} />
</Link>
<Navbar bg="info" variant="dark">
<Navbar.Brand href="/">북마크</Navbar.Brand>
<Nav className="mr-auto">
......@@ -106,7 +110,7 @@ function Bookmark() {
</Row>
</Container>
</Container >
)
}
......
import React, { useState, useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { Link, Redirect } from 'react-router-dom';
import ohuh from '../ohuh.PNG';
import { Container, Row, Form, Image, InputGroup, Button, Col, Card } from 'react-bootstrap';
import { Container, Row, Form, Image, InputGroup, Button, Col, Card, Nav } from 'react-bootstrap';
import axios from 'axios';
import Place from '../Components/Place';
import ohuh from '../ohuh.PNG'
import { Container, Row, Form, Image, InputGroup, Button, Col, Nav } from 'react-bootstrap';
import { handleLogout, isAuthenticated } from '../utils/auth.js'
function App() {
const [state, setState] = useState(false);
const [search, setSearch] = useState("");
const [show, setShow] = useState(false);
const [recommend, setRecommend] = useState([{ name: " ", address: " ", img: " " }]);
const [latest, setLatest] = useState([{ name: " ", address: " ", img: " " }]);
......@@ -64,9 +60,9 @@ function App() {
// <Image src={ohuh} style={{ margin: "5%", marginTop : "3%" }} />
// </Row>
// <Row style={{ marginBottom: "5%" }}>
<Container className="vh-100 d-flex justify-content-md-center align-items-center">
<Col md={6} style={{ marginTop: 140 }}>
<Nav className="justify-content-end" bg="#fff" variant="light" >
<Container className="vh-100 ">
<Col md={12} >
<Nav className="justify-content-end" bg="#fff" variant="light" style={{}} >
{user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>
: (
<>
......@@ -76,12 +72,12 @@ function App() {
)}
<Nav.Link href='/bookmark'>북마크</Nav.Link>
</Nav>
<Row style={{ marginBottom: 20 }}>
<Image src={ohuh} />
<Row className="justify-content-center">
<Image src={ohuh} style={{ margin: "3%", marginTop : "3%" }} />
</Row>
<Row style={{ marginBottom: 500 }}>
<Row style={{ marginBottom: "5%" }}>
<Form className="vw-100" onSubmit={handleSubmit}>
<InputGroup style={{ width: 560 }}>
<InputGroup >
<Form.Control
size="lg"
placeholder="검색어를 입력하세요."
......@@ -97,33 +93,31 @@ function App() {
</Row>
<Row >
<Col md={6} >
<h1 className=" d-flex justify-content-center" style={{marginBottom:"7%"}}>인기관광지</h1>
<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.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" }} >
{recommend.address} </Card.Text>
<Button variant="primary" onClick={() => {
setShow(true)
}}>{recommend.name} 자세히 살펴보기</Button>
<Place place={recommend} show={show} onHide={() => setShow(false)} />
<Link to={`/place?id=${1}&place=${recommend.name}`} >
<Button variant="primary"> {recommend.name} 자세히 살펴보기</Button>
</Link>
</Card.Body>
</Card>
</Col>
<Col md={6} >
<h1 className=" d-flex justify-content-center" style={{marginBottom:"7%"}}>최근 검색관광지</h1>
<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.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" }} >
{latest.address} </Card.Text>
<Button variant="primary" onClick={() => {
setShow(true)
}}>{latest.name} 자세히 살펴보기</Button>
<Place place={latest} show={show} onHide={() => setShow(false)} />
<Link to={`/place?id=${1}&place=${latest.name}`} >
<Button variant="primary"> {latest.name} 자세히 살펴보기</Button>
</Link>
</Card.Body>
</Card>
</Col>
......
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import ohuh from '../ohuh-sm.PNG';
import Place from '../Components/Place';
import { Container, Form, Row, Col, Card, Image, InputGroup, FormControl, Button, Nav } from 'react-bootstrap';
import Paginations from '../Components/Paginations';
import axios from 'axios';
......@@ -18,7 +17,6 @@ function Search(props) {
const [search, setSearch] = useState(queryString.parse(props.location.search).keyword);
const [bookmark, setBookmark] = useState([false, false, false, false])
const user = isAuthenticated()
const [mobile, setMobile] = useState();
const [association, setAssociation] = useState([{ name: " ", address: " ", img: " " }])
const [pagePlace, setPagePlace] = useState([{ name: " ", address: " ", img: " " }, { name: " ", address: " ", img: " " }])
const [endPage, setEndPage] = useState(1)
......@@ -58,10 +56,6 @@ function Search(props) {
setPagePlace(paginate(association, index, 4))
}
setEndPage(Math.floor((association.length / 4)))
<<<<<<< HEAD
=======
console.log("7489309484839", endPage)
>>>>>>> origin/cherry
}, [association, index])
......@@ -92,40 +86,6 @@ function Search(props) {
console.log(scrollHeight, scrollTop, clientHeight)
}
const places = [{
name: "한라산",
address: "제주 서귀포시 토평동 산15-1",
img: "https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg/269px-KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg?size=200x200",
}, {
name: "성산일출봉(sungsan)",
address: "제주 서귀포시 성산읍 성산리 1",
img: "https://www.jeju.go.kr/pub/site/geopark/images/sub/sub03/02%EC%A7%80%EC%A7%88%EB%A7%88%EC%9D%84%EC%9D%B4%EC%95%BC%EA%B8%B0/%EC%A7%80%EC%A7%88%EB%A7%88%EC%9D%84/%EC%A7%80%EC%A7%88%EB%A7%88%EC%9D%84_%EC%84%B1%EC%82%B0%EC%9D%BC%EC%B6%9C%EB%B4%89/1412402261.jpg?400/400",
}, {
name: "해녀의 집(haenyeo)",
address: "제주 서귀포시 성산읍 한도로 141-13지번오조리 3 오조해녀의집",
img: "https://mblogthumb-phinf.pstatic.net/MjAxNjExMTdfMTc0/MDAxNDc5MzU3ODU0ODQy.KZYXCjzsXT3rCsE4HXBfxyCg2buvluBvN_7NxVp7BSwg.loJc89d8JjGXdNCn-4yMd7aMWPjfrZn21TI9Hyzemkog.JPEG.icocam11/20161010_100205.jpg?type=w800",
}, {
name: "오설록 티 뮤지엄(osulloc)",
address: "제주 서귀포시 안덕면 신화역사로 15 오설록지번서광리 1235-1 오설록",
img: "https://cdnweb01.wikitree.co.kr/webdata/editor/202007/01/img_20200701143323_2ced7627.webp",
}, {
name: "오설록 티 뮤지엄(osulloc)",
address: "제주 서귀포시 안덕면 신화역사로 15 오설록지번서광리 1235-1 오설록",
img: "https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg/269px-KOCIS_Halla_Mountain_in_Jeju-do_%286387785543%29.jpg",
}]
if (state !== false) {
// console.log(queryString.parse(props.location.search))
// = {keyword:search}
// return <Redirect to={{
// pathname: `/search?keyword=${search}`,
// state: { id: search },
// }} />;
// history.pushState(null, null, "?"+queryParams.toString());
// return <Redirect to={`/search?keyword=${search}`} />;
}
const handlePage = (num) => {
setIndex(num);
console.log("pagenation num", num)
......@@ -187,7 +147,7 @@ function Search(props) {
return (
<Container >
<Link to="/path" 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">
......
This diff is collapsed.
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