From c384aa6db2ce02c80a8bb2ec158387c9ddd66d07 Mon Sep 17 00:00:00 2001 From: oakes Date: Wed, 2 Aug 2023 15:38:50 -0400 Subject: [PATCH] Pass id to useEffect so it runs when id changes --- app/soapbox/features/hashtag-timeline/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/features/hashtag-timeline/index.tsx b/app/soapbox/features/hashtag-timeline/index.tsx index 69cc0cd60..df0c05236 100644 --- a/app/soapbox/features/hashtag-timeline/index.tsx +++ b/app/soapbox/features/hashtag-timeline/index.tsx @@ -41,7 +41,7 @@ export const HashtagTimeline: React.FC = ({ params }) => { useEffect(() => { dispatch(expandHashtagTimeline(id)); dispatch(fetchHashtag(id)); - }, []); + }, [id]); useEffect(() => { dispatch(clearTimeline(`hashtag:${id}`));