Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
search-page
Commits
ded695bc
Commit
ded695bc
authored
Feb 01, 2021
by
Lee SeoYeon
Browse files
.
parent
f9a36ead
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
ded695bc
[{
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
index.js"
:
"1"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
reportWebVitals.js"
:
"2"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Login.js"
:
"3"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
catchErrors.js"
:
"4"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Signup.js"
:
"5"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
auth.js"
:
"6"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Paginations.js"
:
"7"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
PrivateRoute.js"
:
"8"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Bookmark.js"
:
"9"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Search.js"
:
"10"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
App.js"
:
"11"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Place.js"
:
"12"
},{
"size"
:
1339
,
"mtime"
:
1611985207838
,
"results"
:
"13"
,
"hashOfConfig"
:
"14"
},{
"size"
:
362
,
"mtime"
:
499162500000
,
"results"
:
"15"
,
"hashOfConfig"
:
"14"
},{
"size"
:
3531
,
"mtime"
:
1612153473284
,
"results"
:
"16"
,
"hashOfConfig"
:
"14"
},{
"size"
:
405
,
"mtime"
:
1609915408569
,
"results"
:
"17"
,
"hashOfConfig"
:
"14"
},{
"size"
:
3220
,
"mtime"
:
1612153521941
,
"results"
:
"18"
,
"hashOfConfig"
:
"14"
},{
"size"
:
766
,
"mtime"
:
1612140862813
,
"results"
:
"19"
,
"hashOfConfig"
:
"14"
},{
"size"
:
3724
,
"mtime"
:
1612098437239
,
"results"
:
"20"
,
"hashOfConfig"
:
"14"
},{
"size"
:
438
,
"mtime"
:
1611699613873
,
"results"
:
"21"
,
"hashOfConfig"
:
"14"
},{
"size"
:
5612
,
"mtime"
:
1612145993003
,
"results"
:
"22"
,
"hashOfConfig"
:
"14"
},{
"size"
:
8478
,
"mtime"
:
1612146032403
,
"results"
:
"23"
,
"hashOfConfig"
:
"14"
},{
"size"
:
4813
,
"mtime"
:
1612145992983
,
"results"
:
"24"
,
"hashOfConfig"
:
"14"
},{
"size"
:
2452
,
"mtime"
:
1612141596380
,
"results"
:
"25"
,
"hashOfConfig"
:
"14"
},{
"filePath"
:
"26"
,
"messages"
:
"27"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},
"1t9w6go"
,{
"filePath"
:
"29"
,
"messages"
:
"30"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"31"
,
"messages"
:
"32"
,
"errorCount"
:
0
,
"warningCount"
:
1
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},{
"filePath"
:
"33"
,
"messages"
:
"34"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"35"
,
"messages"
:
"36"
,
"errorCount"
:
0
,
"warningCount"
:
2
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},{
"filePath"
:
"37"
,
"messages"
:
"38"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"39"
,
"messages"
:
"40"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"41"
,
"messages"
:
"42"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"43"
,
"messages"
:
"44"
,
"errorCount"
:
0
,
"warningCount"
:
12
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
"45"
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"46"
,
"messages"
:
"47"
,
"errorCount"
:
0
,
"warningCount"
:
8
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},{
"filePath"
:
"48"
,
"messages"
:
"49"
,
"errorCount"
:
0
,
"warningCount"
:
1
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
"50"
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"51"
,
"messages"
:
"52"
,
"errorCount"
:
0
,
"warningCount"
:
1
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
index.js"
,[],[
"53"
,
"54"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
reportWebVitals.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Login.js"
,[
"55"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
catchErrors.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Signup.js"
,[
"56"
,
"57"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
auth.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Paginations.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
PrivateRoute.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Bookmark.js"
,[
"58"
,
"59"
,
"60"
,
"61"
,
"62"
,
"63"
,
"64"
,
"65"
,
"66"
,
"67"
,
"68"
,
"69"
],
"import React, { useState, useEffect } from 'react'
\r\n
import { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar } from
\"
react-bootstrap
\"\r\n
import axios from
\"
axios
\"\r\n
import catchErrors from './utils/catchErrors.js'
\r\n
import { isAuthenticated } from './utils/auth'
\r\n
import * as Icon from 'react-bootstrap-icons';
\r\n
import Place from './Pages/Place.js'
\r\n\r\n\r\n
const INIT_PAGE = {\r
\n
bookmark: []
\r\n
}
\r\n\r\n\r\n
function Bookmark() {\r
\n
const [page, setPage] = useState(INIT_PAGE)
\r\n
const [index, setIndex] = useState(1);
\r\n
const [error, setError] = useState('')
\r\n
const [state, setState] = useState(false);
\r\n
const [bookmark, setBookmark] = useState([false, false, false, false])
\r\n
const [pagePlace, setPagePlace] = useState([])
\r\n
const [showSet, setShowSet] = useState([false, false, false, false]);
\r\n\r\n
const user = isAuthenticated()
\r\n\r\n
async function getBookmark() {\r
\n
try {\r
\n
const response = await axios.get(`/api/users/bookmark?ID=${user}`)
\r\n
setPagePlace(response.data.bookmark)
\r\n
} catch (error) {\r
\n
catchErrors(error, setError)
\r\n
}
\r\n
}
\r\n\r\n\r\n
async function handleBookmark(index) {\r
\n
if (!bookmark[index]) {\r
\n
console.log(pagePlace[index])
\r\n
try {\r
\n
const response = await axios.put(`/api/users/bookmark?ID=${user}&place=${pagePlace[index]._id}`)
\r\n
alert(response.data, '북마크가 저장되었습니다.')
\r\n
const showArr = bookmark
\r\n
showArr[index] = true
\r\n
setBookmark(showArr)
\r\n
console.log(
\"
bookmark=
\"
, bookmark)
\r\n
} catch (error) {\r
\n
catchErrors(error, setError)
\r\n
}
\r\n
} else {\r
\n
try {\r
\n
const response = await axios.delete(`/api/users/bookmark?ID=${user}`)
\r\n
alert(response.data, '저장된 북마크가 삭제되었습니다.')
\r\n
const showArr = bookmark
\r\n
showArr[index] = false
\r\n
setBookmark(showArr)
\r\n
console.log(
\"
bookmark=
\"
, bookmark)
\r\n
} catch (error) {\r
\n
catchErrors(error, setError)
\r\n
}
\r\n
}
\r\n
}
\r\n
useEffect(() => {\r
\n
getBookmark()
\r\n
}, [])
\r\n\r\n\r\n
return (
\r\n
<Container>
\r\n
<Navbar bg=
\"
info
\"
variant=
\"
dark
\"
>
\r\n
<Navbar.Brand href=
\"
/
\"
>북마크</Navbar.Brand>
\r\n
<Nav className=
\"
mr-auto
\"
>
\r\n
<Nav.Link href=
\"
/
\"
>Home</Nav.Link>
\r\n
</Nav>
\r\n
</Navbar>
\r\n
<Row className=
\"
d-flex flex-wrap
\"
>
\r\n
{console.log(
\"
#####################33
\"
, pagePlace)}
\r\n
{pagePlace.map((place, index) => {\r
\n
return (
\r\n
<Col key=
{
index
}
md=
{
6
}
>
\r\n
<Card align=
\"
center
\"
border=
\"
info
\"
style={{ margin:
\"
3%
\"
}}>
\r\n\r\n
<Card.Title className=
\"
d-flex justify-content-center
\"
style={{ margin:
\"
3%
\"
, fontSize: '200%', fontWeight: 'bold' }} >
{
place.name
}
\r\n
{user ?
\r\n
<Button
\r\n
variant={bookmark[index] ?
\"
primary
\"
:
\"
light
\"
}
\r\n
onClick={() => handleBookmark(index, place)}>
\r\n
<Icon.BookmarkStarFill size=
{
35
}
/>
\r\n
{console.log(
\"
bookmark
\"
, bookmark)}
\r\n
{console.log(
\"
bookmark[index]
\"
, bookmark[index])}</Button> : null}
\r\n
</Card.Title>
\r\n
<Card.Img variant=
\"
top
\"
style={{ padding:
\"
5%
\"
, width:
\"
100%
\"
, height:
\"
340px
\"
}} src=
{
place.img
}
/>
\r\n
<Card.Body >
\r\n
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
\"
80px
\"
}} >
\r\n
{
place.address
}
</Card.Text>
\r\n
<Button variant=
\"
info
\"
onClick={() => {\r
\n
const showArr = [false, false, false, false]
\r\n
showArr[index] = true
\r\n
setShowSet(showArr)
\r\n
}}>
{
place.name
}
자세히 살펴보기</Button>
\r\n
{/* <Place place=
{
place
}
index=
{
index
}
show=
{
showSet[index]
}
onHide={() => setShowSet([false, false, false, false])} /> */}
\r\n
</Card.Body>
\r\n
</Card>
\r\n
</Col>
\r\n
)
\r\n
})}
\r\n\r\n\r\n
</Row>
\r\n
</Container>
\r\n
)
\r\n
}
\r\n\r\n
export default Bookmark
\r\n\r\n\r\n
// async function handleSubmit(e){\r
\n
// setState(true); //버튼이 눌려서 handlesubmit이될때 setState값이 true로 바뀐다
\r\n
// try { //respons 서버에 post로 요청하여 데이터를 받아온다
\r\n
// const response = await axios.post('/api/users/bookmark', page)
\r\n
// setSuccess(true)
\r\n
// } catch (error) {\r
\n
// console.log(error)
\r\n
// catchErrors(error, setError)
\r\n
// }
\r\n
// }
\r\n\r\n
// useEffect(() => {\r
\n
// getBookmark(user)
\r\n
// }, [user])"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Search.js"
,[
"70"
,
"71"
,
"72"
,
"73"
,
"74"
,
"75"
,
"76"
,
"77"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
App.js"
,[
"78"
],
"import React, { useState, useEffect } from 'react';
\r\n
import { Link, Redirect } from 'react-router-dom';
\r\n
import ohuh from '../ohuh.PNG';
\r\n
import { Container, Row, Form, Image, InputGroup, Button, Col, Card, Nav } from 'react-bootstrap';
\r\n
import axios from 'axios';
\r\n
import { handleLogout, isAuthenticated } from '../utils/auth.js'
\r\n
import Place from '../Pages/Place.js';
\r\n\r\n
function App() {\r
\n
const [state, setState] = useState(false);
\r\n
const [search, setSearch] = useState(
\"\"
);
\r\n
const [recommend, setRecommend] = useState([{ name:
\"
\"
, address:
\"
\"
, img:
\"
\"
}]);
\r\n
const [latest, setLatest] = useState([{ name:
\"
\"
, address:
\"
\"
, img:
\"
\"
}]);
\r\n
const user = isAuthenticated()
\r\n\r\n
useEffect(() => {\r
\n
getRecommend()
\r\n
getLatest()
\r\n
}, []);
\r\n\r\n\r\n
if (state !== false) {\r
\n
return <Redirect to=
{
`/search?keyword=${search}`
}
/>;
\r\n
}
\r\n\r\n
const handleChange = (e) => {\r
\n
setSearch(e.target.value);
\r\n
} //바뀌는 것이 있을때 이벤트 발생
\r\n\r\n
const handleSubmit = () => {\r
\n
setState(true);
\r\n
} //submit 버튼을 누르면 state 값을 true로 바뀐다
\r\n\r\n
const getRecommend = () => {\r
\n
axios.get(`/api/app/recommend`)
\r\n
.then(res => {\r
\n
setRecommend(res.data)
\r\n
})
\r\n
.catch(err => {\r
\n
console.log(
\"
APP RECOMMEND ERROR
\"
, err)
\r\n
})
\r\n
}
\r\n\r\n
const getLatest = () => {\r
\n
axios.get(`/api/app/lastest`)
\r\n
.then(res => {\r
\n
setLatest(res.data)
\r\n
})
\r\n
.catch(err => {\r
\n
console.log(
\"
APP LATEST ERROR
\"
, err)
\r\n
})
\r\n
}
\r\n\r\n\r\n\r\n
return (
\r\n
<Container className=
\"
vh-100
\"
>
\r\n
<Col xs=
{
12
}
>
\r\n
<Nav className=
\"
justify-content-end
\"
bg=
\"
#fff
\"
variant=
\"
light
\"
style=
{
{}
}
>
\r\n
{user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>
\r\n
: (
\r\n
<>
\r\n
<Nav.Link href=
\"
/signup
\"
>회원가입</Nav.Link>
\r\n
<Nav.Link href=
\"
/login
\"
>로그인</Nav.Link>
\r\n
</>
\r\n
)}
\r\n
<Nav.Link href='/bookmark'>북마크</Nav.Link>
\r\n
</Nav>
\r\n
<Row className=
\"
justify-content-center
\"
md=
{
2
}
>
\r\n
<Col className=
\"
d-flex justify-content-center
\"
>
\r\n
<Image src=
{
ohuh
}
style={{ margin:
\"
3%
\"
, marginTop :
\"
3%
\"
}} fluid />
\r\n
</Col>
\r\n
</Row>
\r\n
<Row style={{ marginBottom:
\"
5%
\"
}}>
\r\n
<Form className=
\"
vw-100
\"
onSubmit=
{
handleSubmit
}
>
\r\n
<InputGroup >
\r\n
<Form.Control
\r\n
size=
\"
lg
\"\r\n
placeholder=
\"
검색어를 입력하세요.
\"\r\n
aria-label=
\"
Large
\"\r\n
aria-describedby=
\"
inputGroup-sizing-sm
\"\r\n
onChange=
{
handleChange
}
\r\n
/>
\r\n
<InputGroup.Append>
\r\n
<Button type='submit' variant=
\"
outline-secondary
\"
>검색</Button>
\r\n
</InputGroup.Append>
\r\n
</InputGroup>
\r\n
</Form>
\r\n
</Row>
\r\n
<Row xs=
{
6
}
>
\r\n
<Col md=
{
6
}
xs=
{
12
}
>
\r\n
<h1 className=
\"
d-flex justify-content-center
\"
style={{ marginBottom:
\"
7%
\"
}}>인기관광지</h1>
\r\n
<Card align=
\"
center
\"
border=
\"
info
\"
style={{ margin:
\"
3%
\"
}}>
\r\n
<Card.Header style={{ margin:
\"
0
\"
,fontSize: '200%', fontWeight: 'bold' }} >
{
recommend.name
}
</Card.Header>
\r\n
<Card.Img variant=
\"
top
\"
style={{ padding:
\"
5%
\"
, width:
\"
100%
\"
, height:
\"
340px
\"
}} src=
{
recommend.img
}
/>
\r\n
<Card.Body >
\r\n
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
\"
80px
\"
}} >
\r\n
{
recommend.address
}
</Card.Text>
\r\n
<Link to=
{
`/place?id=${1}&place=${recommend.name}`
}
>
\r\n
<Button variant=
\"
info
\"
>
{
recommend.name
}
자세히 살펴보기</Button>
\r\n
</Link>
\r\n
</Card.Body>
\r\n
</Card>
\r\n
</Col>
\r\n\r\n
<Col md=
{
6
}
xs=
{
12
}
>
\r\n
<h1 className=
\"
d-flex justify-content-center
\"
style={{ marginBottom:
\"
7%
\"
}}>최근 검색관광지</h1>
\r\n
<Card align=
\"
center
\"
border=
\"
info
\"
style={{ margin:
\"
3%
\"
}} >
\r\n
<Card.Header style={{ margin:
\"
0
\"
, fontSize: '200%', fontWeight: 'bold'}} bg=
\"
danger
\"
>
{
latest.name
}
</Card.Header>
\r\n
<Card.Img variant=
\"
top
\"
style={{ padding:
\"
5%
\"
, width:
\"
100%
\"
, height:
\"
340px
\"
}} src=
{
latest.img
}
/>
\r\n
<Card.Body >
\r\n
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
\"
80px
\"
}} >
\r\n
{
latest.address
}
</Card.Text>
\r\n
<Link to=
{
`/place?id=${1}&place=${latest.name}`
}
>
\r\n
<Button variant=
\"
info
\"
>
{
latest.name
}
자세히 살펴보기</Button>
\r\n
</Link>
\r\n
</Card.Body>
\r\n
</Card>
\r\n
</Col>
\r\n
</Row>
\r\n
</Col>
\r\n
</Container>
\r\n\r\n\r\n
);
\r\n
}
\r\n\r\n
export default App;
\r\n
"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Place.js"
,[
"79"
],{
"ruleId"
:
"80"
,
"replacedBy"
:
"81"
},{
"ruleId"
:
"82"
,
"replacedBy"
:
"83"
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"85"
,
"line"
:
2
,
"column"
:
68
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
71
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"85"
,
"line"
:
2
,
"column"
:
60
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
63
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"88"
,
"line"
:
7
,
"column"
:
10
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
7
,
"endColumn"
:
14
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"89"
,
"line"
:
2
,
"column"
:
10
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
15
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"90"
,
"line"
:
2
,
"column"
:
39
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
43
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"91"
,
"line"
:
7
,
"column"
:
8
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
7
,
"endColumn"
:
13
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"92"
,
"line"
:
16
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
16
,
"endColumn"
:
16
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"93"
,
"line"
:
16
,
"column"
:
18
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
16
,
"endColumn"
:
25
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"94"
,
"line"
:
17
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
17
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"95"
,
"line"
:
17
,
"column"
:
19
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
17
,
"endColumn"
:
27
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"96"
,
"line"
:
18
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
18
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"97"
,
"line"
:
19
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
19
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"98"
,
"line"
:
19
,
"column"
:
19
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
19
,
"endColumn"
:
27
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"99"
,
"line"
:
22
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
22
,
"endColumn"
:
19
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"101"
,
"line"
:
64
,
"column"
:
8
,
"nodeType"
:
"102"
,
"endLine"
:
64
,
"endColumn"
:
10
,
"suggestions"
:
"103"
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"91"
,
"line"
:
4
,
"column"
:
8
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
4
,
"endColumn"
:
13
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"85"
,
"line"
:
5
,
"column"
:
83
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
5
,
"endColumn"
:
86
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"96"
,
"line"
:
23
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
23
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"104"
,
"line"
:
25
,
"column"
:
20
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
25
,
"endColumn"
:
31
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"105"
,
"line"
:
27
,
"column"
:
19
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
27
,
"endColumn"
:
27
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"106"
,
"line"
:
49
,
"column"
:
8
,
"nodeType"
:
"102"
,
"endLine"
:
49
,
"endColumn"
:
10
,
"suggestions"
:
"107"
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"108"
,
"line"
:
75
,
"column"
:
8
,
"nodeType"
:
"102"
,
"endLine"
:
75
,
"endColumn"
:
15
,
"suggestions"
:
"109"
},{
"ruleId"
:
"110"
,
"severity"
:
1
,
"message"
:
"111"
,
"line"
:
150
,
"column"
:
35
,
"nodeType"
:
"112"
,
"endLine"
:
150
,
"endColumn"
:
76
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"91"
,
"line"
:
7
,
"column"
:
8
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
7
,
"endColumn"
:
13
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"113"
,
"line"
:
36
,
"column"
:
6
,
"nodeType"
:
"102"
,
"endLine"
:
36
,
"endColumn"
:
8
,
"suggestions"
:
"114"
},
"no-native-reassign"
,[
"115"
],
"no-negated-in-lhs"
,[
"116"
],
"no-unused-vars"
,
"'Nav' is defined but never used."
,
"Identifier"
,
"unusedVar"
,
"'Link' is defined but never used."
,
"'Alert' is defined but never used."
,
"'Form' is defined but never used."
,
"'Place' is defined but never used."
,
"'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."
,
"'error' 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-hooks/exhaustive-deps"
,
"React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array."
,
"ArrayExpression"
,[
"117"
],
"'getBookmark' is defined but never used."
,
"'response' is assigned a value but never used."
,
"React Hook useEffect has a missing dependency: 'getAssociation'. Either include it or remove the dependency array."
,[
"118"
],
"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array."
,[
"119"
],
"react/jsx-no-duplicate-props"
,
"No duplicate props allowed"
,
"JSXAttribute"
,
"React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array."
,[
"120"
],
"no-global-assign"
,
"no-unsafe-negation"
,{
"desc"
:
"121"
,
"fix"
:
"122"
},{
"desc"
:
"123"
,
"fix"
:
"124"
},{
"desc"
:
"125"
,
"fix"
:
"126"
},{
"desc"
:
"127"
,
"fix"
:
"128"
},
"Update the dependencies array to be: [getBookmark]"
,{
"range"
:
"129"
,
"text"
:
"130"
},
"Update the dependencies array to be: [getAssociation]"
,{
"range"
:
"131"
,
"text"
:
"132"
},
"Update the dependencies array to be: [getAssociation, props.history, search, state]"
,{
"range"
:
"133"
,
"text"
:
"134"
},
"Update the dependencies array to be: [getReview, infiniteScroll]"
,{
"range"
:
"135"
,
"text"
:
"136"
},[
2220
,
2222
],
"[getBookmark]"
,[
1893
,
1895
],
"[getAssociation]"
,[
2802
,
2809
],
"[getAssociation, props.history, search, state]"
,[
1181
,
1183
],
"[getReview, infiniteScroll]"
]
\ No newline at end of file
[{
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
index.js"
:
"1"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
reportWebVitals.js"
:
"2"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Login.js"
:
"3"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
catchErrors.js"
:
"4"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Signup.js"
:
"5"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
auth.js"
:
"6"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Paginations.js"
:
"7"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
PrivateRoute.js"
:
"8"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Bookmark.js"
:
"9"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Search.js"
:
"10"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
App.js"
:
"11"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Place.js"
:
"12"
},{
"size"
:
1339
,
"mtime"
:
1611985207838
,
"results"
:
"13"
,
"hashOfConfig"
:
"14"
},{
"size"
:
362
,
"mtime"
:
499162500000
,
"results"
:
"15"
,
"hashOfConfig"
:
"14"
},{
"size"
:
3523
,
"mtime"
:
1612154554879
,
"results"
:
"16"
,
"hashOfConfig"
:
"14"
},{
"size"
:
405
,
"mtime"
:
1609915408569
,
"results"
:
"17"
,
"hashOfConfig"
:
"14"
},{
"size"
:
3220
,
"mtime"
:
1612153521941
,
"results"
:
"18"
,
"hashOfConfig"
:
"14"
},{
"size"
:
766
,
"mtime"
:
1612140862813
,
"results"
:
"19"
,
"hashOfConfig"
:
"14"
},{
"size"
:
3724
,
"mtime"
:
1612098437239
,
"results"
:
"20"
,
"hashOfConfig"
:
"14"
},{
"size"
:
438
,
"mtime"
:
1611699613873
,
"results"
:
"21"
,
"hashOfConfig"
:
"14"
},{
"size"
:
5612
,
"mtime"
:
1612145993003
,
"results"
:
"22"
,
"hashOfConfig"
:
"14"
},{
"size"
:
8478
,
"mtime"
:
1612146032403
,
"results"
:
"23"
,
"hashOfConfig"
:
"14"
},{
"size"
:
4813
,
"mtime"
:
1612145992983
,
"results"
:
"24"
,
"hashOfConfig"
:
"14"
},{
"size"
:
2452
,
"mtime"
:
1612141596380
,
"results"
:
"25"
,
"hashOfConfig"
:
"14"
},{
"filePath"
:
"26"
,
"messages"
:
"27"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},
"1t9w6go"
,{
"filePath"
:
"29"
,
"messages"
:
"30"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"31"
,
"messages"
:
"32"
,
"errorCount"
:
0
,
"warningCount"
:
1
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},{
"filePath"
:
"33"
,
"messages"
:
"34"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"35"
,
"messages"
:
"36"
,
"errorCount"
:
0
,
"warningCount"
:
2
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},{
"filePath"
:
"37"
,
"messages"
:
"38"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"39"
,
"messages"
:
"40"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"41"
,
"messages"
:
"42"
,
"errorCount"
:
0
,
"warningCount"
:
0
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"43"
,
"messages"
:
"44"
,
"errorCount"
:
0
,
"warningCount"
:
12
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
"45"
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"46"
,
"messages"
:
"47"
,
"errorCount"
:
0
,
"warningCount"
:
8
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},{
"filePath"
:
"48"
,
"messages"
:
"49"
,
"errorCount"
:
0
,
"warningCount"
:
1
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
"50"
,
"usedDeprecatedRules"
:
"28"
},{
"filePath"
:
"51"
,
"messages"
:
"52"
,
"errorCount"
:
0
,
"warningCount"
:
1
,
"fixableErrorCount"
:
0
,
"fixableWarningCount"
:
0
,
"source"
:
null
},
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
index.js"
,[],[
"53"
,
"54"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
reportWebVitals.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Login.js"
,[
"55"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
catchErrors.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Signup.js"
,[
"56"
,
"57"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
utils
\\
auth.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
Paginations.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Components
\\
PrivateRoute.js"
,[],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Bookmark.js"
,[
"58"
,
"59"
,
"60"
,
"61"
,
"62"
,
"63"
,
"64"
,
"65"
,
"66"
,
"67"
,
"68"
,
"69"
],
"import React, { useState, useEffect } from 'react'
\r\n
import { Alert, Col, Card, Container, Form, Row, Button, Nav, Navbar } from
\"
react-bootstrap
\"\r\n
import axios from
\"
axios
\"\r\n
import catchErrors from './utils/catchErrors.js'
\r\n
import { isAuthenticated } from './utils/auth'
\r\n
import * as Icon from 'react-bootstrap-icons';
\r\n
import Place from './Pages/Place.js'
\r\n\r\n\r\n
const INIT_PAGE = {\r
\n
bookmark: []
\r\n
}
\r\n\r\n\r\n
function Bookmark() {\r
\n
const [page, setPage] = useState(INIT_PAGE)
\r\n
const [index, setIndex] = useState(1);
\r\n
const [error, setError] = useState('')
\r\n
const [state, setState] = useState(false);
\r\n
const [bookmark, setBookmark] = useState([false, false, false, false])
\r\n
const [pagePlace, setPagePlace] = useState([])
\r\n
const [showSet, setShowSet] = useState([false, false, false, false]);
\r\n\r\n
const user = isAuthenticated()
\r\n\r\n
async function getBookmark() {\r
\n
try {\r
\n
const response = await axios.get(`/api/users/bookmark?ID=${user}`)
\r\n
setPagePlace(response.data.bookmark)
\r\n
} catch (error) {\r
\n
catchErrors(error, setError)
\r\n
}
\r\n
}
\r\n\r\n\r\n
async function handleBookmark(index) {\r
\n
if (!bookmark[index]) {\r
\n
console.log(pagePlace[index])
\r\n
try {\r
\n
const response = await axios.put(`/api/users/bookmark?ID=${user}&place=${pagePlace[index]._id}`)
\r\n
alert(response.data, '북마크가 저장되었습니다.')
\r\n
const showArr = bookmark
\r\n
showArr[index] = true
\r\n
setBookmark(showArr)
\r\n
console.log(
\"
bookmark=
\"
, bookmark)
\r\n
} catch (error) {\r
\n
catchErrors(error, setError)
\r\n
}
\r\n
} else {\r
\n
try {\r
\n
const response = await axios.delete(`/api/users/bookmark?ID=${user}`)
\r\n
alert(response.data, '저장된 북마크가 삭제되었습니다.')
\r\n
const showArr = bookmark
\r\n
showArr[index] = false
\r\n
setBookmark(showArr)
\r\n
console.log(
\"
bookmark=
\"
, bookmark)
\r\n
} catch (error) {\r
\n
catchErrors(error, setError)
\r\n
}
\r\n
}
\r\n
}
\r\n
useEffect(() => {\r
\n
getBookmark()
\r\n
}, [])
\r\n\r\n\r\n
return (
\r\n
<Container>
\r\n
<Navbar bg=
\"
info
\"
variant=
\"
dark
\"
>
\r\n
<Navbar.Brand href=
\"
/
\"
>북마크</Navbar.Brand>
\r\n
<Nav className=
\"
mr-auto
\"
>
\r\n
<Nav.Link href=
\"
/
\"
>Home</Nav.Link>
\r\n
</Nav>
\r\n
</Navbar>
\r\n
<Row className=
\"
d-flex flex-wrap
\"
>
\r\n
{console.log(
\"
#####################33
\"
, pagePlace)}
\r\n
{pagePlace.map((place, index) => {\r
\n
return (
\r\n
<Col key=
{
index
}
md=
{
6
}
>
\r\n
<Card align=
\"
center
\"
border=
\"
info
\"
style={{ margin:
\"
3%
\"
}}>
\r\n\r\n
<Card.Title className=
\"
d-flex justify-content-center
\"
style={{ margin:
\"
3%
\"
, fontSize: '200%', fontWeight: 'bold' }} >
{
place.name
}
\r\n
{user ?
\r\n
<Button
\r\n
variant={bookmark[index] ?
\"
primary
\"
:
\"
light
\"
}
\r\n
onClick={() => handleBookmark(index, place)}>
\r\n
<Icon.BookmarkStarFill size=
{
35
}
/>
\r\n
{console.log(
\"
bookmark
\"
, bookmark)}
\r\n
{console.log(
\"
bookmark[index]
\"
, bookmark[index])}</Button> : null}
\r\n
</Card.Title>
\r\n
<Card.Img variant=
\"
top
\"
style={{ padding:
\"
5%
\"
, width:
\"
100%
\"
, height:
\"
340px
\"
}} src=
{
place.img
}
/>
\r\n
<Card.Body >
\r\n
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
\"
80px
\"
}} >
\r\n
{
place.address
}
</Card.Text>
\r\n
<Button variant=
\"
info
\"
onClick={() => {\r
\n
const showArr = [false, false, false, false]
\r\n
showArr[index] = true
\r\n
setShowSet(showArr)
\r\n
}}>
{
place.name
}
자세히 살펴보기</Button>
\r\n
{/* <Place place=
{
place
}
index=
{
index
}
show=
{
showSet[index]
}
onHide={() => setShowSet([false, false, false, false])} /> */}
\r\n
</Card.Body>
\r\n
</Card>
\r\n
</Col>
\r\n
)
\r\n
})}
\r\n\r\n\r\n
</Row>
\r\n
</Container>
\r\n
)
\r\n
}
\r\n\r\n
export default Bookmark
\r\n\r\n\r\n
// async function handleSubmit(e){\r
\n
// setState(true); //버튼이 눌려서 handlesubmit이될때 setState값이 true로 바뀐다
\r\n
// try { //respons 서버에 post로 요청하여 데이터를 받아온다
\r\n
// const response = await axios.post('/api/users/bookmark', page)
\r\n
// setSuccess(true)
\r\n
// } catch (error) {\r
\n
// console.log(error)
\r\n
// catchErrors(error, setError)
\r\n
// }
\r\n
// }
\r\n\r\n
// useEffect(() => {\r
\n
// getBookmark(user)
\r\n
// }, [user])"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Search.js"
,[
"70"
,
"71"
,
"72"
,
"73"
,
"74"
,
"75"
,
"76"
,
"77"
],
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
App.js"
,[
"78"
],
"import React, { useState, useEffect } from 'react';
\r\n
import { Link, Redirect } from 'react-router-dom';
\r\n
import ohuh from '../ohuh.PNG';
\r\n
import { Container, Row, Form, Image, InputGroup, Button, Col, Card, Nav } from 'react-bootstrap';
\r\n
import axios from 'axios';
\r\n
import { handleLogout, isAuthenticated } from '../utils/auth.js'
\r\n
import Place from '../Pages/Place.js';
\r\n\r\n
function App() {\r
\n
const [state, setState] = useState(false);
\r\n
const [search, setSearch] = useState(
\"\"
);
\r\n
const [recommend, setRecommend] = useState([{ name:
\"
\"
, address:
\"
\"
, img:
\"
\"
}]);
\r\n
const [latest, setLatest] = useState([{ name:
\"
\"
, address:
\"
\"
, img:
\"
\"
}]);
\r\n
const user = isAuthenticated()
\r\n\r\n
useEffect(() => {\r
\n
getRecommend()
\r\n
getLatest()
\r\n
}, []);
\r\n\r\n\r\n
if (state !== false) {\r
\n
return <Redirect to=
{
`/search?keyword=${search}`
}
/>;
\r\n
}
\r\n\r\n
const handleChange = (e) => {\r
\n
setSearch(e.target.value);
\r\n
} //바뀌는 것이 있을때 이벤트 발생
\r\n\r\n
const handleSubmit = () => {\r
\n
setState(true);
\r\n
} //submit 버튼을 누르면 state 값을 true로 바뀐다
\r\n\r\n
const getRecommend = () => {\r
\n
axios.get(`/api/app/recommend`)
\r\n
.then(res => {\r
\n
setRecommend(res.data)
\r\n
})
\r\n
.catch(err => {\r
\n
console.log(
\"
APP RECOMMEND ERROR
\"
, err)
\r\n
})
\r\n
}
\r\n\r\n
const getLatest = () => {\r
\n
axios.get(`/api/app/lastest`)
\r\n
.then(res => {\r
\n
setLatest(res.data)
\r\n
})
\r\n
.catch(err => {\r
\n
console.log(
\"
APP LATEST ERROR
\"
, err)
\r\n
})
\r\n
}
\r\n\r\n\r\n\r\n
return (
\r\n
<Container className=
\"
vh-100
\"
>
\r\n
<Col xs=
{
12
}
>
\r\n
<Nav className=
\"
justify-content-end
\"
bg=
\"
#fff
\"
variant=
\"
light
\"
style=
{
{}
}
>
\r\n
{user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>
\r\n
: (
\r\n
<>
\r\n
<Nav.Link href=
\"
/signup
\"
>회원가입</Nav.Link>
\r\n
<Nav.Link href=
\"
/login
\"
>로그인</Nav.Link>
\r\n
</>
\r\n
)}
\r\n
<Nav.Link href='/bookmark'>북마크</Nav.Link>
\r\n
</Nav>
\r\n
<Row className=
\"
justify-content-center
\"
md=
{
2
}
>
\r\n
<Col className=
\"
d-flex justify-content-center
\"
>
\r\n
<Image src=
{
ohuh
}
style={{ margin:
\"
3%
\"
, marginTop :
\"
3%
\"
}} fluid />
\r\n
</Col>
\r\n
</Row>
\r\n
<Row style={{ marginBottom:
\"
5%
\"
}}>
\r\n
<Form className=
\"
vw-100
\"
onSubmit=
{
handleSubmit
}
>
\r\n
<InputGroup >
\r\n
<Form.Control
\r\n
size=
\"
lg
\"\r\n
placeholder=
\"
검색어를 입력하세요.
\"\r\n
aria-label=
\"
Large
\"\r\n
aria-describedby=
\"
inputGroup-sizing-sm
\"\r\n
onChange=
{
handleChange
}
\r\n
/>
\r\n
<InputGroup.Append>
\r\n
<Button type='submit' variant=
\"
outline-secondary
\"
>검색</Button>
\r\n
</InputGroup.Append>
\r\n
</InputGroup>
\r\n
</Form>
\r\n
</Row>
\r\n
<Row xs=
{
6
}
>
\r\n
<Col md=
{
6
}
xs=
{
12
}
>
\r\n
<h1 className=
\"
d-flex justify-content-center
\"
style={{ marginBottom:
\"
7%
\"
}}>인기관광지</h1>
\r\n
<Card align=
\"
center
\"
border=
\"
info
\"
style={{ margin:
\"
3%
\"
}}>
\r\n
<Card.Header style={{ margin:
\"
0
\"
,fontSize: '200%', fontWeight: 'bold' }} >
{
recommend.name
}
</Card.Header>
\r\n
<Card.Img variant=
\"
top
\"
style={{ padding:
\"
5%
\"
, width:
\"
100%
\"
, height:
\"
340px
\"
}} src=
{
recommend.img
}
/>
\r\n
<Card.Body >
\r\n
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
\"
80px
\"
}} >
\r\n
{
recommend.address
}
</Card.Text>
\r\n
<Link to=
{
`/place?id=${1}&place=${recommend.name}`
}
>
\r\n
<Button variant=
\"
info
\"
>
{
recommend.name
}
자세히 살펴보기</Button>
\r\n
</Link>
\r\n
</Card.Body>
\r\n
</Card>
\r\n
</Col>
\r\n\r\n
<Col md=
{
6
}
xs=
{
12
}
>
\r\n
<h1 className=
\"
d-flex justify-content-center
\"
style={{ marginBottom:
\"
7%
\"
}}>최근 검색관광지</h1>
\r\n
<Card align=
\"
center
\"
border=
\"
info
\"
style={{ margin:
\"
3%
\"
}} >
\r\n
<Card.Header style={{ margin:
\"
0
\"
, fontSize: '200%', fontWeight: 'bold'}} bg=
\"
danger
\"
>
{
latest.name
}
</Card.Header>
\r\n
<Card.Img variant=
\"
top
\"
style={{ padding:
\"
5%
\"
, width:
\"
100%
\"
, height:
\"
340px
\"
}} src=
{
latest.img
}
/>
\r\n
<Card.Body >
\r\n
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
\"
80px
\"
}} >
\r\n
{
latest.address
}
</Card.Text>
\r\n
<Link to=
{
`/place?id=${1}&place=${latest.name}`
}
>
\r\n
<Button variant=
\"
info
\"
>
{
latest.name
}
자세히 살펴보기</Button>
\r\n
</Link>
\r\n
</Card.Body>
\r\n
</Card>
\r\n
</Col>
\r\n
</Row>
\r\n
</Col>
\r\n
</Container>
\r\n\r\n\r\n
);
\r\n
}
\r\n\r\n
export default App;
\r\n
"
,
"C:
\\
Users
\\
hello
\\
Desktop
\\
project
\\
search-page
\\
client
\\
src
\\
Pages
\\
Place.js"
,[
"79"
],{
"ruleId"
:
"80"
,
"replacedBy"
:
"81"
},{
"ruleId"
:
"82"
,
"replacedBy"
:
"83"
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"85"
,
"line"
:
2
,
"column"
:
68
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
71
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"85"
,
"line"
:
2
,
"column"
:
60
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
63
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"88"
,
"line"
:
7
,
"column"
:
10
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
7
,
"endColumn"
:
14
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"89"
,
"line"
:
2
,
"column"
:
10
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
15
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"90"
,
"line"
:
2
,
"column"
:
39
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
2
,
"endColumn"
:
43
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"91"
,
"line"
:
7
,
"column"
:
8
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
7
,
"endColumn"
:
13
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"92"
,
"line"
:
16
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
16
,
"endColumn"
:
16
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"93"
,
"line"
:
16
,
"column"
:
18
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
16
,
"endColumn"
:
25
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"94"
,
"line"
:
17
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
17
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"95"
,
"line"
:
17
,
"column"
:
19
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
17
,
"endColumn"
:
27
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"96"
,
"line"
:
18
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
18
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"97"
,
"line"
:
19
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
19
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"98"
,
"line"
:
19
,
"column"
:
19
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
19
,
"endColumn"
:
27
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"99"
,
"line"
:
22
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
22
,
"endColumn"
:
19
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"101"
,
"line"
:
64
,
"column"
:
8
,
"nodeType"
:
"102"
,
"endLine"
:
64
,
"endColumn"
:
10
,
"suggestions"
:
"103"
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"91"
,
"line"
:
4
,
"column"
:
8
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
4
,
"endColumn"
:
13
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"85"
,
"line"
:
5
,
"column"
:
83
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
5
,
"endColumn"
:
86
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"96"
,
"line"
:
23
,
"column"
:
12
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
23
,
"endColumn"
:
17
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"104"
,
"line"
:
25
,
"column"
:
20
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
25
,
"endColumn"
:
31
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"105"
,
"line"
:
27
,
"column"
:
19
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
27
,
"endColumn"
:
27
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"106"
,
"line"
:
49
,
"column"
:
8
,
"nodeType"
:
"102"
,
"endLine"
:
49
,
"endColumn"
:
10
,
"suggestions"
:
"107"
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"108"
,
"line"
:
75
,
"column"
:
8
,
"nodeType"
:
"102"
,
"endLine"
:
75
,
"endColumn"
:
15
,
"suggestions"
:
"109"
},{
"ruleId"
:
"110"
,
"severity"
:
1
,
"message"
:
"111"
,
"line"
:
150
,
"column"
:
35
,
"nodeType"
:
"112"
,
"endLine"
:
150
,
"endColumn"
:
76
},{
"ruleId"
:
"84"
,
"severity"
:
1
,
"message"
:
"91"
,
"line"
:
7
,
"column"
:
8
,
"nodeType"
:
"86"
,
"messageId"
:
"87"
,
"endLine"
:
7
,
"endColumn"
:
13
},{
"ruleId"
:
"100"
,
"severity"
:
1
,
"message"
:
"113"
,
"line"
:
36
,
"column"
:
6
,
"nodeType"
:
"102"
,
"endLine"
:
36
,
"endColumn"
:
8
,
"suggestions"
:
"114"
},
"no-native-reassign"
,[
"115"
],
"no-negated-in-lhs"
,[
"116"
],
"no-unused-vars"
,
"'Nav' is defined but never used."
,
"Identifier"
,
"unusedVar"
,
"'Link' is defined but never used."
,
"'Alert' is defined but never used."
,
"'Form' is defined but never used."
,
"'Place' is defined but never used."
,
"'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."
,
"'error' 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-hooks/exhaustive-deps"
,
"React Hook useEffect has a missing dependency: 'getBookmark'. Either include it or remove the dependency array."
,
"ArrayExpression"
,[
"117"
],
"'getBookmark' is defined but never used."
,
"'response' is assigned a value but never used."
,
"React Hook useEffect has a missing dependency: 'getAssociation'. Either include it or remove the dependency array."
,[
"118"
],
"React Hook useEffect has missing dependencies: 'getAssociation', 'props.history', and 'search'. Either include them or remove the dependency array."
,[
"119"
],
"react/jsx-no-duplicate-props"
,
"No duplicate props allowed"
,
"JSXAttribute"
,
"React Hook useEffect has missing dependencies: 'getReview' and 'infiniteScroll'. Either include them or remove the dependency array."
,[
"120"
],
"no-global-assign"
,
"no-unsafe-negation"
,{
"desc"
:
"121"
,
"fix"
:
"122"
},{
"desc"
:
"123"
,
"fix"
:
"124"
},{
"desc"
:
"125"
,
"fix"
:
"126"
},{
"desc"
:
"127"
,
"fix"
:
"128"
},
"Update the dependencies array to be: [getBookmark]"
,{
"range"
:
"129"
,
"text"
:
"130"
},
"Update the dependencies array to be: [getAssociation]"
,{
"range"
:
"131"
,
"text"
:
"132"
},
"Update the dependencies array to be: [getAssociation, props.history, search, state]"
,{
"range"
:
"133"
,
"text"
:
"134"
},
"Update the dependencies array to be: [getReview, infiniteScroll]"
,{
"range"
:
"135"
,
"text"
:
"136"
},[
2220
,
2222
],
"[getBookmark]"
,[
1893
,
1895
],
"[getAssociation]"
,[
2802
,
2809
],
"[getAssociation, props.history, search, state]"
,[
1181
,
1183
],
"[getReview, infiniteScroll]"
]
\ No newline at end of file
client/src/Components/Login.js
View file @
ded695bc
...
...
@@ -76,7 +76,7 @@ function Login() {
{
loading
&&
<
Spinner
as
=
'
span
'
animation
=
'
border
'
size
=
'
sm
'
role
=
'
status
'
aria
-
hidden
=
'
true
'
/>
}{
'
'
}
확인
<
/Button
>
<
Link
to
=
'
/signup
'
>
회원
가입하지않으셨나
요
?
회원
이
아니신가
요
?
<
/Link
>
<
/Form
>
<
/Col
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment