From 950487e75022f01dbb9031e12db9b42efeea9847 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 25 Sep 2024 10:10:42 -0500 Subject: [PATCH] Let gate cache --- src/state/queries/post-feed.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/state/queries/post-feed.ts b/src/state/queries/post-feed.ts index f23b59978e..bf83636f16 100644 --- a/src/state/queries/post-feed.ts +++ b/src/state/queries/post-feed.ts @@ -147,9 +147,7 @@ export function usePostFeedQuery( * unwanted content, we may over-fetch here to try and fill pages by * `MIN_POSTS`. */ - const fetchLimit = React.useState(() => { - return gate('post_feed_lang_window') ? 100 : MIN_POSTS - })[0] + const fetchLimit = gate('post_feed_lang_window') ? 100 : MIN_POSTS // Make sure this doesn't invalidate unless really needed. const selectArgs = React.useMemo(