Commit 500e9eaf authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

.

parent 32794545
This diff is collapsed.
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment