Skip to content

Solution_Adria_Valles_Jose_Cuevas#52

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

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

Conversation

@jose-cuevas
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@JoanVa JoanVa left a comment

Choose a reason for hiding this comment

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

Pull request cancelled

Copy link
Copy Markdown

@Jose1i1o Jose1i1o left a comment

Choose a reason for hiding this comment

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

Pull Request canceled

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


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 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 =)

const postBody = document.createElement("p");

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

@Jesusjha Jesusjha May 17, 2022

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 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 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

Copy link
Copy Markdown

@Jesusjha Jesusjha left a comment

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