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
b7dc813b
Commit
b7dc813b
authored
Jul 07, 2021
by
Jiwon Yoon
Browse files
Merge branch 'kimpen'
parents
4e0b5e3d
9ab8a632
Changes
4
Show whitespace changes
Inline
Side-by-side
client/src/components/Admin/CinemaEdit.js
View file @
b7dc813b
...
@@ -3,7 +3,7 @@ import KakaoMap from "../KakaoMap";
...
@@ -3,7 +3,7 @@ import KakaoMap from "../KakaoMap";
import
styles
from
"
./admin.module.scss
"
;
import
styles
from
"
./admin.module.scss
"
;
const
CinemaEdit
=
()
=>
{
const
CinemaEdit
=
()
=>
{
const
[
cinemaInfo
,
setCinemaInfo
]
=
useState
({
cinema
:
""
,
transportation
:
""
,
parking
:
""
,
adress
:
""
})
const
[
cinemaInfo
,
setCinemaInfo
]
=
useState
({
cinema
:
""
,
transportation
:
""
,
parking
:
""
,
ad
d
ress
:
""
})
const
[
search
,
setSearch
]
=
useState
(
""
)
const
[
search
,
setSearch
]
=
useState
(
""
)
function
handleChange
(
e
)
{
function
handleChange
(
e
)
{
...
@@ -24,14 +24,14 @@ const CinemaEdit = () => {
...
@@ -24,14 +24,14 @@ const CinemaEdit = () => {
<
label
for
=
"
parking
"
className
=
"
form-label
"
>
자가용
/
주차안내
<
/label
>
<
label
for
=
"
parking
"
className
=
"
form-label
"
>
자가용
/
주차안내
<
/label
>
<
textarea
className
=
{
`form-control
${
styles
.
shadowNone
}
${
styles
.
textarea
}
`
}
rows
=
"
7
"
id
=
"
parking
"
name
=
"
parking
"
onChange
=
{
handleChange
}
><
/textarea
>
<
textarea
className
=
{
`form-control
${
styles
.
shadowNone
}
${
styles
.
textarea
}
`
}
rows
=
"
7
"
id
=
"
parking
"
name
=
"
parking
"
onChange
=
{
handleChange
}
><
/textarea
>
<
/div
>
<
/div
>
<
label
for
=
"
adress
"
className
=
"
form-label
"
>
지도보기
<
/label
>
<
label
for
=
"
ad
d
ress
"
className
=
"
form-label
"
>
지도보기
<
/label
>
<
div
className
=
"
input-group mb-3
"
>
<
div
className
=
"
input-group mb-3
"
>
<
span
className
=
"
input-group-text
"
id
=
"
currentMap
"
><
i
className
=
"
bi bi-geo-alt-fill
"
><
/i></
span
>
<
span
className
=
"
input-group-text
"
id
=
"
currentMap
"
><
i
className
=
"
bi bi-geo-alt-fill
"
><
/i></
span
>
<
input
type
=
"
text
"
className
=
{
`form-control
${
styles
.
shadowNone
}
`
}
id
=
"
adress
"
name
=
"
adress
"
aria
-
label
=
"
map
"
aria
-
describedby
=
"
currentMap
"
onChange
=
{
handleChange
}
/
>
<
input
type
=
"
text
"
className
=
{
`form-control
${
styles
.
shadowNone
}
`
}
id
=
"
ad
d
ress
"
name
=
"
ad
d
ress
"
aria
-
label
=
"
map
"
aria
-
describedby
=
"
currentMap
"
onChange
=
{
handleChange
}
/
>
<
button
className
=
"
btn btn-dark
"
type
=
"
button
"
id
=
"
currentMap
"
onClick
=
{()
=>
setSearch
(
cinemaInfo
.
adress
)}
><
i
className
=
"
bi bi-search
"
><
/i></
button
>
<
button
className
=
"
btn btn-dark
"
type
=
"
button
"
id
=
"
currentMap
"
onClick
=
{()
=>
setSearch
(
cinemaInfo
.
ad
d
ress
)}
><
i
className
=
"
bi bi-search
"
><
/i></
button
>
<
/div
>
<
/div
>
<
div
className
=
"
d-flex justify-content-center mb-5
"
>
<
div
className
=
"
d-flex justify-content-center mb-5
"
>
<
KakaoMap
adress
=
{
search
}
/
>
<
KakaoMap
ad
d
ress
=
{
search
}
/
>
<
/div
>
<
/div
>
<
/
>
<
/
>
)
)
...
...
client/src/components/Admin/MovieEdit.js
View file @
b7dc813b
...
@@ -9,10 +9,12 @@ const MovieEdit = () => {
...
@@ -9,10 +9,12 @@ const MovieEdit = () => {
<
Search
type
=
"
admin
"
/>
<
Search
type
=
"
admin
"
/>
<
/div
>
<
/div
>
<
MovieTable
/>
<
MovieTable
/>
<
div
className
=
"
d-flex
align-items-center
"
>
<
div
className
=
"
d-
md-
flex
"
>
<
Pagination
/>
<
Pagination
/>
<
div
className
=
"
d-flex justify-content-end col-md-3 ms-md-auto my-1
"
>
<
button
type
=
"
button
"
className
=
"
btn btn-dark
"
style
=
{{
width
:
"
5em
"
}}
>
등록
<
/button
>
<
button
type
=
"
button
"
className
=
"
btn btn-dark
"
style
=
{{
width
:
"
5em
"
}}
>
등록
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/
>
<
/
>
)
)
}
}
...
...
client/src/components/KakaoMap.js
View file @
b7dc813b
...
@@ -2,7 +2,7 @@ import { useEffect, useRef } from "react";
...
@@ -2,7 +2,7 @@ import { useEffect, useRef } from "react";
const
{
kakao
}
=
window
;
const
{
kakao
}
=
window
;
const
KakaoMap
=
({
adress
})
=>
{
const
KakaoMap
=
({
ad
d
ress
})
=>
{
const
kakaoMapDiv
=
useRef
(
null
)
const
kakaoMapDiv
=
useRef
(
null
)
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -14,7 +14,7 @@ const KakaoMap = ({ adress }) => {
...
@@ -14,7 +14,7 @@ const KakaoMap = ({ adress }) => {
const
map
=
new
kakao
.
maps
.
Map
(
container
,
options
);
const
map
=
new
kakao
.
maps
.
Map
(
container
,
options
);
const
geocoder
=
new
kakao
.
maps
.
services
.
Geocoder
();
const
geocoder
=
new
kakao
.
maps
.
services
.
Geocoder
();
geocoder
.
addressSearch
(
`
${
adress
}
`
,
function
(
result
,
status
)
{
geocoder
.
addressSearch
(
`
${
ad
d
ress
}
`
,
function
(
result
,
status
)
{
if
(
status
===
kakao
.
maps
.
services
.
Status
.
OK
)
{
if
(
status
===
kakao
.
maps
.
services
.
Status
.
OK
)
{
const
coords
=
new
kakao
.
maps
.
LatLng
(
result
[
0
].
y
,
result
[
0
].
x
);
const
coords
=
new
kakao
.
maps
.
LatLng
(
result
[
0
].
y
,
result
[
0
].
x
);
const
marker
=
new
kakao
.
maps
.
Marker
({
const
marker
=
new
kakao
.
maps
.
Marker
({
...
@@ -22,11 +22,11 @@ const KakaoMap = ({ adress }) => {
...
@@ -22,11 +22,11 @@ const KakaoMap = ({ adress }) => {
position
:
coords
position
:
coords
});
});
map
.
setCenter
(
coords
);
map
.
setCenter
(
coords
);
}
else
if
(
adress
!=
''
)
{
}
else
if
(
ad
d
ress
!=
''
)
{
alert
(
"
찾을 수 없는 주소입니다. 다시 입력해주세요.
"
)
alert
(
"
찾을 수 없는 주소입니다. 다시 입력해주세요.
"
)
}
}
});
});
},
[
adress
])
},
[
ad
d
ress
])
return
(
return
(
<
div
ref
=
{
kakaoMapDiv
}
style
=
{{
width
:
"
500px
"
,
height
:
"
400px
"
}}
><
/div
>
<
div
ref
=
{
kakaoMapDiv
}
style
=
{{
width
:
"
500px
"
,
height
:
"
400px
"
}}
><
/div
>
...
...
client/src/components/Pagination.js
View file @
b7dc813b
const
Pagination
=
()
=>
{
const
Pagination
=
()
=>
{
return
(
return
(
<
nav
aria
-
label
=
"
Page navigation example
"
>
<
nav
className
=
"
col-md-3 ms-md-auto my-1
"
aria
-
label
=
"
Page navigation example
"
>
<
ul
className
=
"
pagination justify-content-center
"
>
<
ul
className
=
"
pagination justify-content-center
mb-0
"
>
<
li
className
=
"
page-item
"
>
<
li
className
=
"
page-item
"
>
<
a
className
=
"
page-link
"
href
=
"
#
"
aria
-
label
=
"
Previous
"
>
<
a
className
=
"
page-link
"
href
=
"
#
"
aria
-
label
=
"
Previous
"
>
<
span
aria
-
hidden
=
"
true
"
>&
laquo
;
<
/span
>
<
span
aria
-
hidden
=
"
true
"
>&
laquo
;
<
/span
>
...
...
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