Skip to content

Commit

Permalink
Oops. Added lint fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
patcon committed Nov 9, 2024
1 parent 3ede039 commit abc2b3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ if (search) {
search.classList.remove('dn')
const input = search.querySelector('input')

function setSearchParam(searchParam) {
function setSearchParam (searchParam) {
// Update the URL without adding to the search history
const newurl = `${window.location.protocol}//${window.location.host}${window.location.pathname}?q=${encodeURIComponent(searchParam)}`
window.history.replaceState({path: newurl}, '', newurl)
window.history.replaceState({ path: newurl }, '', newurl)
}

// Function to handle search logic
function handleSearch(searchValue) {
function handleSearch (searchValue) {
setSearchParam(searchValue)

if (searchValue === '') {
Expand Down

0 comments on commit abc2b3f

Please sign in to comment.