From 1ec389fd0f3c4a703122275044869304cad55f98 Mon Sep 17 00:00:00 2001 From: Andy Tudhope Date: Sat, 25 Aug 2018 11:06:24 +0200 Subject: [PATCH] Updates App.js to Work Better With Instructions Just made it more clear what needs to be done when following the template. Having lines that need to be replaced rather than just added in can cause noobs confusion (going on experience in India). --- app/js/components/App.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/js/components/App.js b/app/js/components/App.js index b2c19ad..eec336f 100644 --- a/app/js/components/App.js +++ b/app/js/components/App.js @@ -23,7 +23,6 @@ class App extends Component { componentDidMount() { // TODO: Invoke the next function as soon as Embark is ready - this._loadPosts(); } _toggleForm = () => { @@ -40,12 +39,14 @@ class App extends Component { let list = []; - const total = 1; // TODO: Use + // TODO: replace by using `numPosts` to obtain the number of posts our contract has in storage: + const total = 1; + if(total > 0){ for (let i = 0; i < total; i++) { // TODO: the constant `currentPost` should have the info that comes from the `post` function of the contract. - // this object here is just a placeholder. + // Replace this object with the code in the instructions as it just a placeholder. const currentPost = { upvotes: 0, downvotes: 0, owner: "0x1234567890123456789012345678901234567890", creationDate: "153399", description: "0x00" };