Skip to content

Commit 6f1bf55

Browse files
KianNHRebeccaTamachiro
authored andcommitted
[Docs Site] Support array search params in ProductCatalog filters (#21405)
1 parent 20d4dd2 commit 6f1bf55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ProductCatalog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ const ProductCatalog = ({ products }: { products: ProductData[] }) => {
4444
useEffect(() => {
4545
// On component load, check for deep-links to groups in the query param
4646
const params = new URLSearchParams(window.location.search);
47-
const groups = params.get("product-group");
47+
const groups = params.get("product-group")?.split(",");
4848

4949
if (!groups) return;
5050

5151
setFilters({
5252
...filters,
53-
groups: [groups],
53+
groups,
5454
});
5555
}, []);
5656

0 commit comments

Comments
 (0)