Skip to content

Commit

Permalink
Update use-link-filters.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
devkiran committed Mar 2, 2025
1 parent ab165bf commit e36acdc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions apps/web/ui/links/use-link-filters.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import useDomains from "@/lib/swr/use-domains";
import useLinksCount from "@/lib/swr/use-links-count";
import useTags from "@/lib/swr/use-tags";
import useTagsCount from "@/lib/swr/use-tags-count";
Expand Down Expand Up @@ -235,20 +234,16 @@ function useDomainFilterOptions() {
},
});

const { allActiveDomains } = useDomains();

return useMemo(() => {
if (!domainsCount || domainsCount.length === 0) return [];

if (!domainsCount || domainsCount.length === 0) return [];

return domainsCount
.map(({ domain, _count }) => ({
slug: domain,
count: _count,
}))
.sort((a, b) => b.count - a.count);
}, [allActiveDomains, domainsCount]);
}, [domainsCount]);
}

function useUserFilterOptions() {
Expand Down

0 comments on commit e36acdc

Please sign in to comment.