Skip to content

Solution_Adria_Valles_Jose_Cuevas#52

Open
jose-cuevas wants to merge 19 commits into
assembler-institute:mainfrom
jose-cuevas:main
Open

Solution_Adria_Valles_Jose_Cuevas#52
jose-cuevas wants to merge 19 commits into
assembler-institute:mainfrom
jose-cuevas:main

Conversation

@jose-cuevas

Copy link
Copy Markdown

No description provided.

@JoanVa JoanVa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request cancelled

@Jose1i1o Jose1i1o left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request canceled

Comment thread src/js/main.js
Comment on lines +136 to +137
console.log(commentsTitle);
console.log(showComments);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging tools could've been deleted

Comment thread src/js/main.js

commentsContainer.textContent = "";
commentsBtn.style.display = "block";
modalPosts.close();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable scope not available

Comment thread src/js/main.js
Comment on lines +71 to +79
async function fetchUsers(userId, postId) {
const userPromise = await fetch(`http://localhost:3000/users/${userId}`)
.then(function (response) {
return response.json();
})
.then(function (data) {
createPost(data, postId);
});
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of this function, it is easy to access to the data =)

Comment thread src/js/main.js
const postBody = document.createElement("p");

const fetchPosts = fetch(`http://localhost:3000/posts/${postId}`);
fetchPosts

@Jesusjha Jesusjha May 17, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed to declare it in a variable

Comment thread src/js/main.js
Comment on lines +117 to +118
const commentsBtn = document.getElementById("commentsBtn");
const commentsContainer = document.getElementById("commentsContainer");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could've been declared globally

Comment thread src/js/main.js
Comment on lines +143 to +145
commentName.style.fontSize = "2rem";
commentBody.style.fontSize = "1rem";
userEmail.style.fontSize = "1rem";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could've added all styles from CSS and add classes from JS

@Jesusjha Jesusjha left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job <3 <3 =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants