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
500e9eaf
Commit
500e9eaf
authored
Jan 25, 2021
by
Lee SeoYeon
Browse files
.
parent
32794545
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
500e9eaf
This diff is collapsed.
Click to expand it.
client/src/Bookmark.js
View file @
500e9eaf
...
...
@@ -6,8 +6,9 @@ import { isAuthenticated } from './utils/auth'
import
{
Redirect
}
from
'
react-router-dom
'
const
INIT_PAGE
=
{
name
:
''
,
bookmark
:
[]
bookmark
:
[
'
제주도
'
],
bookmark
:
[
'
한라산
'
],
}
const
user
=
isAuthenticated
()
...
...
@@ -16,15 +17,14 @@ function Bookmark() {
const
[
page
,
setPage
]
=
useState
(
INIT_PAGE
)
const
[
error
,
setError
]
=
useState
(
''
)
async
function
handleSubmit
(
event
)
{
event
.
preventDefault
()
const
user
=
isAuthenticated
()
async
function
getBookmark
(
user
)
{
try
{
setError
(
''
)
const
response
=
await
axios
.
post
(
'
/api/users/bookmark
'
,
page
)
console
.
log
(
page
)
// setUser(INIT_USER)
const
response
=
await
axios
.
post
(
`/api/users/bookmark/
${
user
}
`
)
setPage
(
response
.
data
)
}
catch
(
error
)
{
console
.
log
(
error
)
catchErrors
(
error
,
setError
)
}
}
...
...
@@ -45,8 +45,8 @@ function Bookmark() {
<
/Navbar
>
<
Form
>
<
ListGroup
>
<
ListGroup
.
Item
action
href
=
""
>
북마크1
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크2
<
/ListGroup.Item
>
<
ListGroup
.
Item
value
=
{
page
.
bookmark
}
>
<
/ListGroup.Item
>
<
ListGroup
.
Item
><
/ListGroup.Item
>
<
/ListGroup
>
<
/Form
>
<
/Container
>
...
...
client/src/EditBookmark.js
0 → 100644
View file @
500e9eaf
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