mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf: eliminate redundant derived state in board and post views
This commit is contained in:
@@ -462,7 +462,7 @@ const Catalog = () => {
|
||||
}, [clearMatchedFilters, subplebbitAddress]);
|
||||
|
||||
// Apply filter colors to posts when feed changes
|
||||
useEffect(() => {
|
||||
const coloredFeed = useMemo(() => {
|
||||
if (combinedFeed.length > 0 && filterItems.length > 0) {
|
||||
// Clear existing matched filters
|
||||
clearMatchedFilters();
|
||||
@@ -482,6 +482,7 @@ const Catalog = () => {
|
||||
}
|
||||
});
|
||||
}
|
||||
return combinedFeed;
|
||||
}, [combinedFeed, filterItems, clearMatchedFilters]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user