mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
chore: show only necessary tags on a category
This commit is contained in:
@@ -43,13 +43,13 @@ export default function ToolsByCategory() {
|
||||
const { t } = useTranslation(validNamespaces);
|
||||
const rawTitle = getToolCategoryTitle(categoryName as string, t);
|
||||
// First get tools by category without filtering
|
||||
const toolsByCategory =
|
||||
getToolsByCategory(selectedUserTypes, t).find(
|
||||
({ type }) => type === categoryName
|
||||
)?.tools ?? [];
|
||||
const toolsByCategory = getToolsByCategory(selectedUserTypes, t).find(
|
||||
({ type }) => type === categoryName
|
||||
);
|
||||
const categoryDefinedTools = toolsByCategory?.tools ?? [];
|
||||
|
||||
const categoryTools = filterTools(
|
||||
toolsByCategory,
|
||||
categoryDefinedTools,
|
||||
searchTerm,
|
||||
selectedUserTypes,
|
||||
t
|
||||
@@ -108,6 +108,7 @@ export default function ToolsByCategory() {
|
||||
my={2}
|
||||
>
|
||||
<UserTypeFilter
|
||||
userTypes={toolsByCategory?.userTypes ?? undefined}
|
||||
selectedUserTypes={selectedUserTypes}
|
||||
onUserTypesChange={setSelectedUserTypes}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user