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
2757306f
Commit
2757306f
authored
Jul 12, 2021
by
Kim, Subin
Browse files
cinemaInfo 자식컴포넌트로 넘겨줘서 주소정보 받기
parent
cf16aae7
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/src/components/Admin/CinemaEdit.js
View file @
2757306f
...
...
@@ -34,7 +34,7 @@ const CinemaEdit = () => {
<
button
className
=
"
btn btn-dark
"
type
=
"
button
"
id
=
"
currentMap
"
onClick
=
{()
=>
setSearch
(
cinemaInfo
.
keyword
)}
><
i
className
=
"
bi bi-search
"
><
/i></
button
>
<
/div
>
<
div
className
=
"
d-flex justify-content-center mb-5
"
>
<
KakaoMap
keyword
=
{
search
}
/
>
<
KakaoMap
keyword
=
{
search
}
cinemaInfo
=
{
cinemaInfo
}
setCinemaInfo
=
{
setCinemaInfo
}
/
>
<
/div
>
<
/
>
)
...
...
client/src/components/KakaoMap/KakaoMap.js
View file @
2757306f
...
...
@@ -3,7 +3,7 @@ import styles from "./kakao-map.module.scss";
const
{
kakao
}
=
window
;
const
KakaoMap
=
({
keyword
})
=>
{
const
KakaoMap
=
({
keyword
,
cinemaInfo
,
setCinemaInfo
})
=>
{
const
kakaoMapDiv
=
useRef
(
null
)
const
menu
=
useRef
(
null
)
const
searchList
=
useRef
(
null
)
...
...
@@ -93,6 +93,9 @@ const KakaoMap = ({ keyword }) => {
itemEl
.
style
.
background
=
'
#fff
'
;
infowindow
.
close
();
};
itemEl
.
onclick
=
function
()
{
setCinemaInfo
({
...
cinemaInfo
,
address
:
place
.
address_name
})
}
}
},
[
keyword
])
...
...
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