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
Show whitespace changes
Inline
Side-by-side
client/src/apis/movie.api.js
View file @
28b903fe
...
...
@@ -33,7 +33,6 @@ const search = async (title) => {
}
}
const
{
data
}
=
await
axios
.
get
(
`
${
baseUrl
}
/api/movie/search`
,
payload
)
console
.
log
(
"
server recive==
"
,
data
)
return
data
}
...
...
client/src/components/SearchResult.js
View file @
28b903fe
...
...
@@ -18,14 +18,13 @@ const SearchResult = () => {
async
function
findforKeyword
()
{
try
{
setError
(
""
)
const
data
=
await
movieApi
.
search
(
title
)
setResult
([...
data
])
const
{
count
,
rows
}
=
await
movieApi
.
search
(
title
)
setResult
([...
rows
])
}
catch
(
error
)
{
catchErrors
(
error
,
setError
)
}
}
console
.
log
(
"
search==
"
,
search
,
"
title==
"
,
title
)
return
(
<>
{
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