Skip to content

Commit

Permalink
FIX/PLP (Search) (deco-cx#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielMatosBoubee authored and vitoUwu committed Feb 12, 2024
1 parent 59490ce commit 12cef1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vnda/loaders/productListingPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,13 @@ const searchLoader = async (
? resolvedTagNames
: undefined;

// TODO: Ensure continued functionality for pages like s?q=, and verify that search functionality works with paths like /example.
const preference = categoryTagsToFilter
? term
: qQueryString ?? url.pathname.slice(1);

const response = await api["GET /api/v2/products/search"]({
term,
term: term ?? preference,
sort,
page,
per_page: count,
Expand Down

0 comments on commit 12cef1b

Please sign in to comment.