fix: remove unused variables from catalog and post views

- catalog.tsx: Remove unused 'coloredFeed' variable assignment in useMemo
- post.tsx: Remove unused 'useState' import

The useMemo in catalog.tsx still executes its side effects (applying filter
colors to the store) without needing to assign the return value.
This commit is contained in:
plebeius
2025-10-16 23:16:38 +02:00
parent b10ada55e7
commit 760e8d900e
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -461,8 +461,8 @@ const Catalog = () => {
};
}, [clearMatchedFilters, subplebbitAddress]);
// Apply filter colors to posts when feed changes
const coloredFeed = useMemo(() => {
// Memoize filter color application to avoid redundant iterations
useMemo(() => {
if (combinedFeed.length > 0 && filterItems.length > 0) {
// Clear existing matched filters
clearMatchedFilters();
@@ -482,7 +482,6 @@ const Catalog = () => {
}
});
}
return combinedFeed;
}, [combinedFeed, filterItems, clearMatchedFilters]);
return (
+1 -1
View File
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { Comment, Role, useComment, useEditedComment, useSubplebbit } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';