Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오인제
/
Tunnel
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정의왕
2021-12-09 12:58:40 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7b09fe58a51ef8e2e4fdf0967eb1880f0266d322
7b09fe58
1 parent
731a579f
Fixed file
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
turnel_FE/src/component/views/Modal/ContentModal.js
turnel_FE/src/component/views/Modal/ContentModal.js
View file @
7b09fe5
...
...
@@ -17,24 +17,15 @@ function ContentModal({element}) {
setOpen
(
false
);
}
const
[
open
,
setOpen
]
=
useState
(
false
)
<<<<<<<
HEAD
const
[
BoardComment
,
setBoardComment
]
=
useState
(
''
)
=======
const
[
BoardComment
,
setBoardComment
]
=
useState
(
""
)
>>>>>>>
a7a00ce3dcec95df5fd17594f215fe752568dfa5
const
onCommentHandler
=
(
event
)
=>
{
setBoardComment
(
event
.
currentTarget
.
value
)
console
.
log
(
BoardComment
)
}
const
onSubmitHandler
=
()
=>
{
<<<<<<<
HEAD
Axios
.
post
(
`/api/comment
${
element
.
id
}
`
,{
content
:
BoardComment
=======
Axios
.
post
(
'/api/comment/write'
,{
postid
:
element
.
id
,
comment
:
BoardComment
>>>>>>>
a7a00ce3dcec95df5fd17594f215fe752568dfa5
})
.
then
((
res
)
=>
{
if
(
res
.
status
===
200
){
...
...
@@ -64,25 +55,19 @@ function ContentModal({element}) {
<
/Modal.Description
>
<
/Modal.Content
>
<
Modal
.
Content
>
{
viewComment
&&
viewComment
.
map
(
elem
=>
{
{
viewComment
&&
viewComment
.
map
(
elem
=>
{
return
<
div
className
=
"ui segment"
>
<<<<<<<
HEAD
<
h2
>
{
elem
.
id
}
<
/h2
>
=======
<
h2
>
{
elem
.
userid
}
<
/h2
>
>>>>>>>
a7a00ce3dcec95df5fd17594f215fe752568dfa5
<
h4
>
{
elem
.
comment
}
<
/h4
>
<
h4
>
{
elem
.
comment
}
<
/h4
>
<
/div>
}
)}
)}
<
/Modal.Content
>
<
Modal
.
Actions
>
<
Comment
>
<
Comment
>
<
Form
reply
>
<
Form
.
TextArea
value
=
{
BoardComment
}
onChange
=
{
onCommentHandler
}
/
>
<
div
onClick
=
{
handleClose
}
>
<
Button
content
=
'댓글 남기기'
onClick
=
{
onSubmitHandler
}
labelPosition
=
'left'
icon
=
'edit'
primary
/>
<
Button
onClick
=
{
handleClose
}
color
=
'black'
>
닫기
<
/Button
>
<
/div
>
<
/Form
>
<
/Comment
>
<
/Modal.Actions
>
...
...
Please
register
or
login
to post a comment