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
e2fc281a
Commit
e2fc281a
authored
Feb 01, 2021
by
baesangjune
Browse files
.
parent
c7df9b76
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
e2fc281a
This diff is collapsed.
Click to expand it.
client/src/Bookmark.js
View file @
e2fc281a
...
...
@@ -18,7 +18,7 @@ function Bookmark() {
const
[
index
,
setIndex
]
=
useState
(
1
);
const
[
error
,
setError
]
=
useState
(
''
)
const
[
state
,
setState
]
=
useState
(
false
);
const
[
bookmark
,
setBookmark
]
=
useState
([
false
,
false
,
false
,
fals
e
])
const
[
bookmark
,
setBookmark
]
=
useState
([
true
,
true
,
true
,
tru
e
])
const
[
pagePlace
,
setPagePlace
]
=
useState
([])
const
[
showSet
,
setShowSet
]
=
useState
([
false
,
false
,
false
,
false
]);
...
...
@@ -49,7 +49,7 @@ function Bookmark() {
}
}
else
{
try
{
const
response
=
await
axios
.
delete
(
`/api/users/bookmark?ID=
${
user
}
`
)
const
response
=
await
axios
.
delete
(
`/api/users/bookmark?ID=
${
user
}
&place=
${
pagePlace
[
index
].
_id
}
`
)
alert
(
response
.
data
,
'
저장된 북마크가 삭제되었습니다.
'
)
const
showArr
=
bookmark
showArr
[
index
]
=
false
...
...
@@ -68,7 +68,7 @@ function Bookmark() {
return
(
<
Container
>
<
Link
to
=
"
/
"
className
=
"
d-flex justify-content-center
"
>
<
Image
style
=
{{
margin
:
"
1%
"
}}
src
=
{
ohuh
}
/
>
<
Image
style
=
{{
margin
:
"
1%
"
}}
src
=
{
ohuh
}
/
>
<
/Link
>
<
Navbar
bg
=
"
info
"
variant
=
"
dark
"
>
<
Navbar
.
Brand
href
=
"
/
"
>
북마크
<
/Navbar.Brand
>
...
...
@@ -96,12 +96,9 @@ function Bookmark() {
<
Card
.
Body
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
{
place
.
address
}
<
/Card.Text
>
<
Button
variant
=
"
info
"
onClick
=
{()
=>
{
const
showArr
=
[
false
,
false
,
false
,
false
]
showArr
[
index
]
=
true
setShowSet
(
showArr
)
}}
>
{
place
.
name
}
자세히
살펴보기
<
/Button
>
{
/* <Place place={place} index={index} show={showSet[index]} onHide={() => setShowSet([false, false, false, false])} /> */
}
<
Link
to
=
{
`/place?id=
${
1
}
&place=
${
place
.
name
}
`
}
>
<
Button
variant
=
"
info
"
>
{
place
.
name
}
자세히
살펴보기
<
/Button
>
<
/Link
>
<
/Card.Body
>
<
/Card
>
<
/Col
>
...
...
client/src/Pages/App.js
View file @
e2fc281a
...
...
@@ -96,7 +96,7 @@ function App() {
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
{
recommend
.
address
}
<
/Card.Text
>
<
Link
to
=
{
`/place?id=
${
1
}
&place=
${
recommend
.
name
}
`
}
>
<
Button
variant
=
"
primary
"
>
{
recommend
.
name
}
자세히
살펴보기
<
/Button
>
<
Button
variant
=
"
info
"
>
{
recommend
.
name
}
자세히
살펴보기
<
/Button
>
<
/Link
>
<
/Card.Body
>
<
/Card
>
...
...
@@ -111,7 +111,7 @@ function App() {
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
{
latest
.
address
}
<
/Card.Text
>
<
Link
to
=
{
`/place?id=
${
1
}
&place=
${
latest
.
name
}
`
}
>
<
Button
variant
=
"
primary
"
>
{
latest
.
name
}
자세히
살펴보기
<
/Button
>
<
Button
variant
=
"
info
"
>
{
latest
.
name
}
자세히
살펴보기
<
/Button
>
<
/Link
>
<
/Card.Body
>
<
/Card
>
...
...
client/src/Pages/Search.js
View file @
e2fc281a
...
...
@@ -100,6 +100,7 @@ function Search(props) {
e
.
preventDefault
()
setState
(
true
)
setIndex
(
1
)
setBookmark
([
false
,
false
,
false
,
false
])
}
function
paginate
(
items
,
pageNumber
,
itemNumber
)
{
...
...
@@ -139,13 +140,9 @@ function Search(props) {
}
}
}
let
time
=
new
Date
()
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
"
>
...
...
@@ -162,7 +159,6 @@ function Search(props) {
<
/InputGroup
>
<
/Form
>
<
/Row
>
{
time
.
toLocaleString
()}
<
Row
className
=
"
d-flex flex-wrap
"
>
{
console
.
log
(
"
#####################33
"
,
pagePlace
)}
...
...
@@ -170,15 +166,16 @@ function Search(props) {
return
(
<
Col
key
=
{
index
}
md
=
{
6
}
>
<
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
}
<
Row
>
<
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
}
/
>
{
console
.
log
(
"
bookmark
"
,
bookmark
)}
{
console
.
log
(
"
bookmark[index]
"
,
bookmark
[
index
])}
<
/Button> : null
}
<
Button
variant
=
{
bookmark
[
index
]
?
"
info
"
:
"
light
"
}
onClick
=
{()
=>
handlebookmark
(
index
,
place
)}
>
<
Icon
.
BookmarkStarFill
size
=
{
35
}
/
>
{
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
}
/
>
...
...
@@ -186,7 +183,7 @@ function Search(props) {
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
{
place
.
address
}
<
/Card.Text
>
<
Link
to
=
{
`/place?id=
${
index
}
&place=
${
place
.
name
}
`
}
>
<
Button
variant
=
"
primary
"
>
{
place
.
name
}
자세히
살펴보기
<
/Button
>
<
Button
variant
=
"
info
"
>
{
place
.
name
}
자세히
살펴보기
<
/Button
>
<
/Link
>
<
/Card.Body
>
<
/Card
>
...
...
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