Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

small improvements to filter.list

Steven Tey34f8819329c8
diff --git a/apps/web/ui/layout/help/index.tsx b/apps/web/ui/layout/help/index.tsx
index f92ac5f655..4116d04bd8 100644
--- a/apps/web/ui/layout/help/index.tsx
+++ b/apps/web/ui/layout/help/index.tsx
@@ -21,6 +21,11 @@ export default function HelpPortal() {
async function HelpPortalRSC() {
const { popularHelpArticles, allHelpArticles } = await fetch(
"https://dub.co/api/content",
+ {
+ next: {
+ revalidate: 60 * 60 * 24, // cache for 24 hours
+ },
+ },
).then((res) => res.json());
return (
diff --git a/apps/web/ui/links/use-link-filters.tsx b/apps/web/ui/links/use-link-filters.tsx
index d51e500970..44f1592fcd 100644
--- a/apps/web/ui/links/use-link-filters.tsx
+++ b/apps/web/ui/links/use-link-filters.tsx
@@ -47,13 +47,13 @@ export function useLinkFilters() {
props.option?.data?.color ??
tags?.find(({ id }) => id === value)?.color;
return tagColor ? (
- <TagBadge color={tagColor} withIcon className="sm:p-1.5" />
+ <TagBadge color={tagColor} withIcon className="sm:p-1" />
) : null;
},
options:
tags?.map(({ id, name, color, count }) => ({
value: id,
- icon: <TagBadge color={color} withIcon className="sm:p-1.5" />,
+ icon: <TagBadge color={color} withIcon className="sm:p-1" />,
label: name,
data: { color },
right: count,
diff --git a/packages/ui/src/filter/filter-list.tsx b/packages/ui/src/filter/filter-list.tsx
index 2400a79358..4a4bf09e2d 100644
--- a/packages/ui/src/filter/filter-list.tsx
+++ b/packages/ui/src/filter/filter-list.tsx
@@ -29,7 +29,12 @@ export function FilterList({
className="w-full"
transition={{ type: "tween", duration: 0.3 }}
>
- <div className={cn("flex w-full flex-wrap items-start gap-4", className)}>
+ <div
+ className={cn(
+ "flex w-full flex-wrap items-start gap-4 sm:flex-nowrap sm:items-center",
+ className,
+ )}
+ >
<div className="flex grow flex-wrap gap-x-4 gap-y-2">
<AnimatePresence>
{activeFilters?.map(({ key, value: filterValue }) => {