From 68f66075f244d3bc6b34aa2b16aec78c9f08b219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 27 Oct 2023 17:27:49 +0200 Subject: [PATCH] Hide hashtag follow toggle when unauthenticated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/features/hashtag-timeline/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/hashtag-timeline/index.tsx b/src/features/hashtag-timeline/index.tsx index f5c21b5b9..27d8212ea 100644 --- a/src/features/hashtag-timeline/index.tsx +++ b/src/features/hashtag-timeline/index.tsx @@ -7,7 +7,7 @@ import { useHashtagStream } from 'soapbox/api/hooks'; import List, { ListItem } from 'soapbox/components/list'; import { Column, Toggle } from 'soapbox/components/ui'; import Timeline from 'soapbox/features/ui/components/timeline'; -import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks'; +import { useAppDispatch, useAppSelector, useFeatures, useLoggedIn } from 'soapbox/hooks'; interface IHashtagTimeline { params?: { @@ -22,7 +22,7 @@ export const HashtagTimeline: React.FC = ({ params }) => { const dispatch = useAppDispatch(); const tag = useAppSelector((state) => state.tags.get(id)); const next = useAppSelector(state => state.timelines.get(`hashtag:${id}`)?.next); - + const { isLoggedIn } = useLoggedIn(); const handleLoadMore = (maxId: string) => { dispatch(expandHashtagTimeline(id, { url: next, maxId })); @@ -50,7 +50,7 @@ export const HashtagTimeline: React.FC = ({ params }) => { return ( - {features.followHashtags && ( + {features.followHashtags && isLoggedIn && ( }