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).
This commit is contained in:
Andy Tudhope 2018-08-25 11:06:24 +02:00 committed by GitHub
parent 0d78c99dc3
commit 1ec389fd0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
};