Skip to content

Project-Reddit Eval KF #226

Open
Kfabb wants to merge 2 commits intoprojectshft:masterfrom
Kfabb:master
Open

Project-Reddit Eval KF #226
Kfabb wants to merge 2 commits intoprojectshft:masterfrom
Kfabb:master

Conversation

@Kfabb
Copy link

@Kfabb Kfabb commented Nov 26, 2024

No description provided.

placeholder="Your Text"
/>
</div>

Choose a reason for hiding this comment

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

no need for empty lines

Comment on lines +12 to +27
newPostP.innerHTML = `<a class='btn btn-link' id='commentsBtn'>comments</a>
<a class='btn btn-link' id='remove'>remove</a>
${postText} - Posted By: ${postName}
<div name= "commentForm" class='commentForm collapse'>
<form class="comment-submission">
<div name="commentSection"></div>
<div class='form-group' name='comment-input'>
<input type="text" class='form-control' name='commentText' placeholder ='Your Comment'>
</div>
<div class='form-group' name='name-input'>
<input type='text' class='form-control' name='commentName' placeholder='Your Name'>
</div>
<button type='button' id='submitComment' class='btn btn-primary float-start'>Submit</button>
</form>
</div>`
;

Choose a reason for hiding this comment

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

check your indentation settings

}

document.getElementById("submitPost").addEventListener("click", () => {
if (document.getElementById("postText").value && document.getElementById ("postName").value){

Choose a reason for hiding this comment

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

spacing is off here

if (document.getElementById("postText").value && document.getElementById ("postName").value){
createPost();
postText.value = "";
ostName.value = "";}

Choose a reason for hiding this comment

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

you have a typo that is creating a bug

Comment on lines +66 to +72
const newComment = document.createElement("div");
newComment.className = "d-inline-flext newComment"
const newCommentP = document.createElement("p")

newCommentP.innerHTML = `<a class='btn btn-link' id='removeComment'>remove</a> ${comment} - Posted By: ${commenter}`
newComment.appendChild(newCommentP)
commentSection.append(newComment)}

Choose a reason for hiding this comment

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

move to a new function

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments