Open
Conversation
…, icon, search bar, and nav to header
…sync, add manageData()
DogSoulDev
reviewed
May 17, 2022
DogSoulDev
left a comment
There was a problem hiding this comment.
Nice work , some missing semicolon and nothing important at all. The only important error is the duplicated ID. So we decide to give you 10 points!
|
|
||
| // Get Comments from json server | ||
| async function getComments () { | ||
| try { |
There was a problem hiding this comment.
Where is the finally ?? Bro
try {
try_statements
}
catch (exception_var) {
catch_statements
}
finally {
finally_statements
}
| // Variable and listener for searchbar functions | ||
| const searchBtn = document.getElementById('headerSearchBtn'); | ||
| searchBtn.addEventListener('click', function () { | ||
| getSearchResults() |
| // Call function to define data for window onload | ||
| async function manageData () { | ||
| const data = await getPostData(); | ||
| displayPosts(data) |
| @@ -0,0 +1,32 @@ | |||
| import { getPostData, displayPosts } from './main.js' | |||
| const posts = await getPostData(); | ||
| const searchResults = posts.filter((post) => { | ||
| return post.title.includes(searchString); | ||
| }) |
| } | ||
|
|
||
|
|
||
| export { getSearchResults, displaySearchResults, removePosts} No newline at end of file |
index.html
Outdated
| <!-- modal content --> | ||
| <article id="modalContent" class="modal-dialog modal-dialog-centered"> | ||
| <div class="modal-content"> | ||
| <header id="modalContent" class="modal-header"> |
There was a problem hiding this comment.
Error: Duplicate ID modalContent.
From line 35, column 13; to line 35, column 59
<header id="modalContent" class="modal-header">↩
| @@ -0,0 +1,72 @@ | |||
| @import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;0,6..72,800;1,6..72,300;1,6..72,400;1,6..72,500;1,6..72,600;1,6..72,700;1,6..72,800&display=swap'); | |||
|
GREAT JOB!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PULL REQUEST