Skip to content

18p Solution #117

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

Open
wants to merge 1 commit into
base: 18p
Choose a base branch
from
Open

18p Solution #117

wants to merge 1 commit into from

Conversation

SuperSimpleDev
Copy link
Owner

No description provided.

@@ -7,7 +7,20 @@ loadProducts(renderProductsGrid);
function renderProductsGrid() {
let productsHTML = '';

products.forEach((product) => {
const url = new URL(window.location.href);
const search = url.searchParams.get('search');
Copy link

@antaugustol antaugustol Mar 31, 2025

Choose a reason for hiding this comment

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

Since we are only using the search part of the url, we could do it like this:

  const url = new URLSearchParams(location.search)
  const search = url.get('search').toLowerCase()

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