mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
unnecessary memoization
This commit is contained in:
@@ -56,16 +56,13 @@ const Board = () => {
|
|||||||
const { sortType } = useSortingStore();
|
const { sortType } = useSortingStore();
|
||||||
const { timeFilterSeconds, timeFilterName } = useTimeFilter();
|
const { timeFilterSeconds, timeFilterName } = useTimeFilter();
|
||||||
|
|
||||||
const feedOptions: any = useMemo(
|
const feedOptions = {
|
||||||
() => ({
|
subplebbitAddresses,
|
||||||
subplebbitAddresses,
|
sortType,
|
||||||
sortType,
|
postsPerPage: isInAllView || isInSubscriptionsView ? 5 : 25,
|
||||||
postsPerPage: isInAllView || isInSubscriptionsView ? 5 : 25,
|
...(isInAllView || isInSubscriptionsView ? { newerThan: timeFilterSeconds } : {}),
|
||||||
...(isInAllView || isInSubscriptionsView ? { newerThan: timeFilterSeconds } : {}),
|
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
||||||
filter: hideThreadsWithoutImages ? threadsWithoutImagesFilter : undefined,
|
};
|
||||||
}),
|
|
||||||
[subplebbitAddresses, sortType, timeFilterSeconds, isInAllView, isInSubscriptionsView, hideThreadsWithoutImages],
|
|
||||||
);
|
|
||||||
|
|
||||||
const { feed, hasMore, loadMore, reset, subplebbitAddressesWithNewerPosts } = useFeed(feedOptions);
|
const { feed, hasMore, loadMore, reset, subplebbitAddressesWithNewerPosts } = useFeed(feedOptions);
|
||||||
const { accountComments } = useAccountComments();
|
const { accountComments } = useAccountComments();
|
||||||
|
|||||||
Reference in New Issue
Block a user