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
cbc36f50
Commit
cbc36f50
authored
Feb 01, 2021
by
Lee SeoYeon
Browse files
Merge remote-tracking branch 'origin/BAE' into lsy
parents
5cc48ff1
c7df9b76
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/src/Bookmark.js
View file @
cbc36f50
...
@@ -84,7 +84,7 @@ function Bookmark() {
...
@@ -84,7 +84,7 @@ function Bookmark() {
<
Col
key
=
{
index
}
md
=
{
6
}
>
<
Col
key
=
{
index
}
md
=
{
6
}
>
<
Card
align
=
"
center
"
border
=
"
info
"
style
=
{{
margin
:
"
3%
"
}}
>
<
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
?
{
user
?
<
Button
<
Button
variant
=
{
bookmark
[
index
]
?
"
primary
"
:
"
light
"
}
variant
=
{
bookmark
[
index
]
?
"
primary
"
:
"
light
"
}
...
@@ -92,7 +92,7 @@ function Bookmark() {
...
@@ -92,7 +92,7 @@ function Bookmark() {
<
Icon
.
BookmarkStarFill
size
=
{
35
}
/
>
<
Icon
.
BookmarkStarFill
size
=
{
35
}
/
>
{
console
.
log
(
"
bookmark
"
,
bookmark
)}
{
console
.
log
(
"
bookmark
"
,
bookmark
)}
{
console
.
log
(
"
bookmark[index]
"
,
bookmark
[
index
])}
<
/Button> : null
}
{
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
.
Img
variant
=
"
top
"
style
=
{{
padding
:
"
5%
"
,
width
:
"
100%
"
,
height
:
"
340px
"
}}
src
=
{
place
.
img
}
/
>
<
Card
.
Body
>
<
Card
.
Body
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
...
...
client/src/Pages/App.js
View file @
cbc36f50
...
@@ -54,15 +54,8 @@ function App() {
...
@@ -54,15 +54,8 @@ function App() {
return
(
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
"
>
<
Container
className
=
"
vh-100
"
>
<
Col
md
=
{
12
}
>
<
Col
xs
=
{
12
}
>
<
Nav
className
=
"
justify-content-end
"
bg
=
"
#fff
"
variant
=
"
light
"
style
=
{{}}
>
<
Nav
className
=
"
justify-content-end
"
bg
=
"
#fff
"
variant
=
"
light
"
style
=
{{}}
>
{
user
?
<
Nav
.
Link
onClick
=
{()
=>
handleLogout
()}
>
로그아웃
<
/Nav.Link
>
{
user
?
<
Nav
.
Link
onClick
=
{()
=>
handleLogout
()}
>
로그아웃
<
/Nav.Link
>
:
(
:
(
...
@@ -73,8 +66,10 @@ function App() {
...
@@ -73,8 +66,10 @@ function App() {
)}
)}
<
Nav
.
Link
href
=
'
/bookmark
'
>
북마크
<
/Nav.Link
>
<
Nav
.
Link
href
=
'
/bookmark
'
>
북마크
<
/Nav.Link
>
<
/Nav
>
<
/Nav
>
<
Row
className
=
"
justify-content-center
"
>
<
Row
className
=
"
justify-content-center
"
md
=
{
2
}
>
<
Image
src
=
{
ohuh
}
style
=
{{
margin
:
"
3%
"
,
marginTop
:
"
3%
"
}}
/
>
<
Col
className
=
"
d-flex justify-content-center
"
>
<
Image
src
=
{
ohuh
}
style
=
{{
margin
:
"
3%
"
,
marginTop
:
"
3%
"
}}
fluid
/>
<
/Col
>
<
/Row
>
<
/Row
>
<
Row
style
=
{{
marginBottom
:
"
5%
"
}}
>
<
Row
style
=
{{
marginBottom
:
"
5%
"
}}
>
<
Form
className
=
"
vw-100
"
onSubmit
=
{
handleSubmit
}
>
<
Form
className
=
"
vw-100
"
onSubmit
=
{
handleSubmit
}
>
...
@@ -92,11 +87,11 @@ function App() {
...
@@ -92,11 +87,11 @@ function App() {
<
/InputGroup
>
<
/InputGroup
>
<
/Form
>
<
/Form
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
xs
=
{
6
}
>
<
Col
md
=
{
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%
"
}}
>
인기관광지
<
/h1
>
<
Card
align
=
"
center
"
border
=
"
info
"
style
=
{{
margin
:
"
3%
"
}}
>
<
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
.
Img
variant
=
"
top
"
style
=
{{
padding
:
"
5%
"
,
width
:
"
100%
"
,
height
:
"
340px
"
}}
src
=
{
recommend
.
img
}
/
>
<
Card
.
Body
>
<
Card
.
Body
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
...
@@ -108,10 +103,10 @@ function App() {
...
@@ -108,10 +103,10 @@ function App() {
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
Col
md
=
{
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%
"
}}
>
최근
검색관광지
<
/h1
>
<
Card
align
=
"
center
"
border
=
"
info
"
style
=
{{
margin
:
"
3%
"
}}
>
<
Card
align
=
"
center
"
border
=
"
info
"
style
=
{{
margin
:
"
3%
"
}}
>
<
Card
.
Title
style
=
{{
margin
:
"
3%
"
,
fontSize
:
'
200%
'
,
fontWeight
:
'
bold
'
}}
>
{
latest
.
name
}
<
/Card.
Title
>
<
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
.
Img
variant
=
"
top
"
style
=
{{
padding
:
"
5%
"
,
width
:
"
100%
"
,
height
:
"
340px
"
}}
src
=
{
latest
.
img
}
/
>
<
Card
.
Body
>
<
Card
.
Body
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
...
...
client/src/Pages/Search.js
View file @
cbc36f50
...
@@ -14,7 +14,6 @@ function Search(props) {
...
@@ -14,7 +14,6 @@ function Search(props) {
const
[
state
,
setState
]
=
useState
(
false
);
const
[
state
,
setState
]
=
useState
(
false
);
const
[
index
,
setIndex
]
=
useState
(
1
);
const
[
index
,
setIndex
]
=
useState
(
1
);
const
[
showSet
,
setShowSet
]
=
useState
([
false
,
false
,
false
,
false
]);
const
[
search
,
setSearch
]
=
useState
(
queryString
.
parse
(
props
.
location
.
search
).
keyword
);
const
[
search
,
setSearch
]
=
useState
(
queryString
.
parse
(
props
.
location
.
search
).
keyword
);
const
[
bookmark
,
setBookmark
]
=
useState
([
false
,
false
,
false
,
false
])
const
[
bookmark
,
setBookmark
]
=
useState
([
false
,
false
,
false
,
false
])
const
user
=
isAuthenticated
()
const
user
=
isAuthenticated
()
...
@@ -28,7 +27,7 @@ function Search(props) {
...
@@ -28,7 +27,7 @@ function Search(props) {
const
response
=
await
axios
.
get
(
`/api/users/bookmark?ID=
${
user
}
`
)
const
response
=
await
axios
.
get
(
`/api/users/bookmark?ID=
${
user
}
`
)
// setBookmark(response.data.bookmark)
// setBookmark(response.data.bookmark)
}
catch
(
error
)
{
}
catch
(
error
)
{
catchErrors
(
error
,
setError
)
catchErrors
(
error
,
setError
(
error
)
)
}
}
}
}
...
@@ -114,7 +113,6 @@ function Search(props) {
...
@@ -114,7 +113,6 @@ function Search(props) {
console
.
log
(
"
뿌릴 data22222222222222222
"
,
page
)
console
.
log
(
"
뿌릴 data22222222222222222
"
,
page
)
return
page
return
page
}
}
//usestate 쓰거나 한번에 useeffect에 넣기
async
function
handlebookmark
(
index
)
{
async
function
handlebookmark
(
index
)
{
if
(
!
bookmark
[
index
])
{
if
(
!
bookmark
[
index
])
{
...
@@ -148,7 +146,7 @@ function Search(props) {
...
@@ -148,7 +146,7 @@ function Search(props) {
return
(
return
(
<
Container
>
<
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
"
>
<
Row
className
=
"
mb-2
"
className
=
"
d-flex justify-content-center
"
>
<
Form
style
=
{{
width
:
"
90vw
"
}}
onSubmit
=
{
handleSubmit
}
>
<
Form
style
=
{{
width
:
"
90vw
"
}}
onSubmit
=
{
handleSubmit
}
>
<
InputGroup
size
=
"
lg
"
>
<
InputGroup
size
=
"
lg
"
>
...
@@ -165,23 +163,25 @@ function Search(props) {
...
@@ -165,23 +163,25 @@ function Search(props) {
<
/InputGroup
>
<
/InputGroup
>
<
/Form
>
<
/Form
>
<
/Row
>
<
/Row
>
{
/*
{time.toLocaleString()}
*/
}
{
time
.
toLocaleString
()}
<
Row
className
=
"
d-flex flex-wrap
"
>
<
Row
className
=
"
d-flex flex-wrap
"
>
{
console
.
log
(
"
#####################33
"
,
pagePlace
)}
{
console
.
log
(
"
#####################33
"
,
pagePlace
)}
{
pagePlace
.
map
((
place
,
index
)
=>
{
{
pagePlace
.
map
((
place
,
index
)
=>
{
return
(
return
(
<
Col
key
=
{
index
}
md
=
{
6
}
>
<
Col
key
=
{
index
}
md
=
{
6
}
>
<
Card
align
=
"
center
"
border
=
"
info
"
style
=
{{
margin
:
"
3%
"
}}
>
<
Card
align
=
"
center
"
border
=
"
info
"
style
=
{{
margin
:
"
2%
"
}}
>
<
Row
className
=
"
d-flex justify-content-center
"
>
<
Card
.
Title
className
=
"
d-flex justify-content-center
"
style
=
{{
margin
:
"
3%
"
,
fontSize
:
'
200%
'
,
fontWeight
:
'
bold
'
}}
>
{
place
.
name
}
<
Card
.
Header
style
=
{{
margin
:
"
0
"
,
marginLeft
:
"
3%
"
,
marginRight
:
"
3%
"
,
fontSize
:
'
200%
'
,
fontWeight
:
'
bold
'
,
width
:
"
100vw
"
}}
>
{
place
.
name
}
{
user
?
{
user
?
<
Button
<
Button
variant
=
{
bookmark
[
index
]
?
"
primary
"
:
"
light
"
}
variant
=
{
bookmark
[
index
]
?
"
primary
"
:
"
light
"
}
onClick
=
{()
=>
handlebookmark
(
index
,
place
)}
>
onClick
=
{()
=>
handlebookmark
(
index
,
place
)}
>
<
Icon
.
BookmarkStarFill
size
=
{
35
}
/
>
<
Icon
.
BookmarkStarFill
size
=
{
35
}
/
>
<
/Button> : null
}
{
console
.
log
(
"
bookmark
"
,
bookmark
)}
<
/Card.Title
>
{
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
.
Img
variant
=
"
top
"
style
=
{{
padding
:
"
5%
"
,
width
:
"
100%
"
,
height
:
"
340px
"
}}
src
=
{
place
.
img
}
/
>
<
Card
.
Body
>
<
Card
.
Body
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
...
...
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