Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution_Adria_Valles_Jose_Cuevas #52

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

jose-cuevas
Copy link

No description provided.

Copy link

@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

@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);

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();

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);
});
}

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

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

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

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

@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