[object Object]

← back to Silverleafwallpaper

fix sort: pass state.sort to /api/products query so sort select actually works

b6eeceb556e6ffb2b74ce2e19556ffe87843c6b2 · 2026-05-18 20:46:02 -0700 · Steve Abrams

Files touched

Diff

commit b6eeceb556e6ffb2b74ce2e19556ffe87843c6b2
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:46:02 2026 -0700

    fix sort: pass state.sort to /api/products query so sort select actually works
---
 public/index.html | 1 +
 1 file changed, 1 insertion(+)

diff --git a/public/index.html b/public/index.html
index 129427e..5f477b5 100644
--- a/public/index.html
+++ b/public/index.html
@@ -543,6 +543,7 @@ async function loadGridPage() {
   const params = new URLSearchParams({ page:state.page, limit:24 });
   if (state.q) params.set('q', state.q);
   if (state.facet !== 'all') params.set('aesthetic', state.facet);
+  if (state.sort) params.set('sort', state.sort);
   let data;
   try {
     const r = await fetch('/api/products?' + params);

← 29b57a4 untrack 20 stale .bak/.pre- snapshot files; ignore *.bak.* a  ·  back to Silverleafwallpaper  ·  fix /api/facets total: report niche-filtered count not pre-n 78e18f9 →