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
c7df9b76
Commit
c7df9b76
authored
Feb 01, 2021
by
baesangjune
Browse files
북마크 문제 발견
parent
b9552a52
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
c7df9b76
This diff is collapsed.
Click to expand it.
client/src/Bookmark.js
View file @
c7df9b76
...
@@ -83,7 +83,7 @@ function Bookmark() {
...
@@ -83,7 +83,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
"
}
...
@@ -91,7 +91,7 @@ function Bookmark() {
...
@@ -91,7 +91,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/Search.js
View file @
c7df9b76
...
@@ -13,7 +13,6 @@ function Search(props) {
...
@@ -13,7 +13,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
()
...
@@ -27,7 +26,7 @@ function Search(props) {
...
@@ -27,7 +26,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
)
)
}
}
}
}
...
@@ -113,7 +112,6 @@ function Search(props) {
...
@@ -113,7 +112,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
])
{
...
@@ -147,7 +145,7 @@ function Search(props) {
...
@@ -147,7 +145,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
"
>
...
@@ -164,7 +162,7 @@ function Search(props) {
...
@@ -164,7 +162,7 @@ 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
)}
...
...
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