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
b6f91f8e
Commit
b6f91f8e
authored
Jul 21, 2021
by
Kim, Subin
Browse files
글등록버튼 삭제 및 서버연결
parent
71e6442e
Changes
1
Show whitespace changes
Inline
Side-by-side
client/src/components/Admin/MovieEdit.js
View file @
b6f91f8e
...
@@ -7,7 +7,7 @@ import catchErrors from "../../utils/catchErrors.js";
...
@@ -7,7 +7,7 @@ import catchErrors from "../../utils/catchErrors.js";
import
styles
from
"
./admin.module.scss
"
;
import
styles
from
"
./admin.module.scss
"
;
const
MovieEdit
=
()
=>
{
const
MovieEdit
=
()
=>
{
const
[
search
,
setSearch
]
=
useState
({
kind
:
"
"
,
keyword
:
""
})
const
[
search
,
setSearch
]
=
useState
({
type
:
"
admin
"
,
keyword
:
""
})
const
[
movieList
,
setMovieList
]
=
useState
([])
const
[
movieList
,
setMovieList
]
=
useState
([])
const
[
error
,
setError
]
=
useState
(
""
)
const
[
error
,
setError
]
=
useState
(
""
)
...
@@ -28,6 +28,8 @@ const MovieEdit = () => {
...
@@ -28,6 +28,8 @@ const MovieEdit = () => {
async
function
searchMovie
()
{
async
function
searchMovie
()
{
try
{
try
{
setError
(
""
)
setError
(
""
)
const
findMovie
=
await
movieApi
.
search
(
search
)
setMovieList
(
findMovie
)
}
catch
(
error
)
{
}
catch
(
error
)
{
catchErrors
(
error
,
setError
)
catchErrors
(
error
,
setError
)
}
}
...
@@ -35,17 +37,11 @@ const MovieEdit = () => {
...
@@ -35,17 +37,11 @@ const MovieEdit = () => {
return
(
return
(
<>
<>
{
console
.
log
(
"
search==
"
,
search
)}
<
div
className
=
"
d-flex justify-content-md-end justify-content-center mb-3
"
>
<
div
className
=
"
d-flex justify-content-md-end justify-content-center mb-3
"
>
<
Search
type
=
"
admin
"
search
=
{
search
}
setSearch
=
{
setSearch
}
handleClick
=
{
searchMovie
}
/
>
<
Search
search
=
{
search
}
setSearch
=
{
setSearch
}
handleClick
=
{
searchMovie
}
/
>
<
/div
>
<
/div
>
<
MovieTable
movieList
=
{
movieList
}
/
>
<
MovieTable
movieList
=
{
movieList
}
/
>
<
div
className
=
"
d-flex flex-wrap
"
>
<
Pagination
/>
<
Pagination
/>
<
div
className
=
"
d-flex justify-content-end col-12 col-md-4 my-2
"
>
<
button
type
=
"
button
"
className
=
{
`btn btn-dark
${
styles
.
customBtn
}
`
}
>
등록
<
/button
>
<
/div
>
<
/div
>
<
/
>
<
/
>
)
)
}
}
...
...
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