Skip to content

Commit

Permalink
Handle missing category
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Apr 21, 2024
1 parent 2f6fed1 commit a729398
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions apps/web/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,16 @@ function PriceChanges() {
<CheckBadgeIcon className="h-4 w-4" aria-hidden="true" />
)}
</div>
<div className="text-light text-sm">
<Link
to={`/bottles/?category=${bottle.category}`}
className="hover:underline"
>
{formatCategoryName(bottle.category)}
</Link>
</div>
{!!bottle.category && (
<div className="text-light text-sm">
<Link
to={`/bottles/?category=${bottle.category}`}
className="hover:underline"
>
{formatCategoryName(bottle.category)}
</Link>
</div>
)}
</td>
<td className="py-2 pl-3 pr-4 text-right sm:table-cell sm:pr-3">
<div className="text-light flex flex-col items-end text-xs">
Expand Down

0 comments on commit a729398

Please sign in to comment.