Skip to content

Commit

Permalink
fix(app/routes/brands): link to brand products
Browse files Browse the repository at this point in the history
This patch links to the products page instead of the shows page when a
user clicks on a brand link. We show all the products that have that
brand. Previously, there were very few brands listed that had shows.
  • Loading branch information
nicholaschiang committed Feb 25, 2024
1 parent 99351e6 commit 3eabca7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/routes/_layout.brands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ export default function BrandsPage() {
return (
<ListLayout title='brands'>
{brands.map((brand) => {
const param = filterToSearchParam<'brand', 'is'>({
const param = filterToSearchParam<'brands', 'some'>({
id: nanoid(5),
name: 'brand',
condition: 'is',
name: 'brands',
condition: 'some',
value: { id: brand.id, name: brand.name },
})
return (
<li key={brand.id}>
<Link
prefetch='intent'
className='link underline'
to={`/shows?${FILTER_PARAM}=${encodeURIComponent(param)}`}
to={`/products?${FILTER_PARAM}=${encodeURIComponent(param)}`}
>
{brand.name}
</Link>
Expand Down

0 comments on commit 3eabca7

Please sign in to comment.