diff --git a/src/components/PostViewFooter/PostViewFooter.js b/src/components/PostViewFooter/PostViewFooter.js
index 164c0e3..17b48b3 100644
--- a/src/components/PostViewFooter/PostViewFooter.js
+++ b/src/components/PostViewFooter/PostViewFooter.js
@@ -16,10 +16,9 @@ class PostViewFooter extends Component {
.then(res => {
res.json().then(data => {
this.setState({
+ dataCheck: true,
data: data.replies
});
- //console.log(data);
- console.log(this.state.data);
});
})
.catch(err => {
@@ -28,9 +27,6 @@ class PostViewFooter extends Component {
}
}
render() {
- //console.log(this.state);
- //const replyData = this.props.data.replies;
- //console.log(replyData);
return (
- {this.state.data.map((reply, i) => {
- return (
-
- );
- })}
+ {this.state.dataCheck &&
+ this.state.data.map((reply, i) => {
+ return (
+
+ );
+ })}
);
diff --git a/src/components/Reply/Reply.js b/src/components/Reply/Reply.js
index c176069..976cbf0 100644
--- a/src/components/Reply/Reply.js
+++ b/src/components/Reply/Reply.js
@@ -4,6 +4,14 @@ import { IconContext } from 'react-icons';
import { GoTrashcan } from 'react-icons/go/';
import { GoTools } from 'react-icons/go/';
+const deleteReply = reply_Id => {
+ fetch('http://localhost:9090/api/reply' + reply_Id);
+};
+
+const modifyReply = reply_Id => {
+ fetch('http://localhost:9090/api/reply' + reply_Id);
+};
+
class Reply extends Component {
// console.log('reply : ' + JSON.stringify(data[0]));
//console.log(JSON.stringify(data));
@@ -30,7 +38,10 @@ class Reply extends Component {
{content}