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
butter-studio
Commits
28b903fe
Commit
28b903fe
authored
Jul 20, 2021
by
Kim, Subin
Browse files
일반 search 완성
parent
89ada388
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/src/apis/movie.api.js
View file @
28b903fe
...
@@ -33,7 +33,6 @@ const search = async (title) => {
...
@@ -33,7 +33,6 @@ const search = async (title) => {
}
}
}
}
const
{
data
}
=
await
axios
.
get
(
`
${
baseUrl
}
/api/movie/search`
,
payload
)
const
{
data
}
=
await
axios
.
get
(
`
${
baseUrl
}
/api/movie/search`
,
payload
)
console
.
log
(
"
server recive==
"
,
data
)
return
data
return
data
}
}
...
...
client/src/components/SearchResult.js
View file @
28b903fe
...
@@ -18,14 +18,13 @@ const SearchResult = () => {
...
@@ -18,14 +18,13 @@ const SearchResult = () => {
async
function
findforKeyword
()
{
async
function
findforKeyword
()
{
try
{
try
{
setError
(
""
)
setError
(
""
)
const
data
=
await
movieApi
.
search
(
title
)
const
{
count
,
rows
}
=
await
movieApi
.
search
(
title
)
setResult
([...
data
])
setResult
([...
rows
])
}
catch
(
error
)
{
}
catch
(
error
)
{
catchErrors
(
error
,
setError
)
catchErrors
(
error
,
setError
)
}
}
}
}
console
.
log
(
"
search==
"
,
search
,
"
title==
"
,
title
)
return
(
return
(
<>
<>
{
result
.
length
!==
0
?
(
{
result
.
length
!==
0
?
(
...
...
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