From f35bb73b55c104da99d16e0a7bb2e8d28a0e10d6 Mon Sep 17 00:00:00 2001 From: plebeius Date: Fri, 27 Feb 2026 17:04:34 +0800 Subject: [PATCH] fix(boardsbar): show mod in mobile board selector when on /mod/ --- src/components/boardsbar/boardsbar.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/boardsbar/boardsbar.tsx b/src/components/boardsbar/boardsbar.tsx index e3d89235..d1dab104 100644 --- a/src/components/boardsbar/boardsbar.tsx +++ b/src/components/boardsbar/boardsbar.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import getShortAddress from '../../lib/get-short-address'; import { useAccountComment } from '@plebbit/plebbit-react-hooks'; import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; -import { isAllView, isCatalogView, isSubscriptionsView } from '../../lib/utils/view-utils'; +import { isAllView, isCatalogView, isModView, isSubscriptionsView } from '../../lib/utils/view-utils'; import { useDirectories, DirectoryCommunity } from '../../hooks/use-directories'; import { useBoardPath, useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address'; import { getBoardPath, extractDirectoryFromTitle } from '../../lib/utils/route-utils'; @@ -324,8 +324,9 @@ const BoardsBarMobile = ({ subplebbitAddress }: { subplebbitAddress?: string }) const isInAllView = isAllView(location.pathname); const isInCatalogView = isCatalogView(location.pathname, params); const isInSubscriptionsView = isSubscriptionsView(location.pathname, params); + const isInModView = isModView(location.pathname); const boardPath = useBoardPath(subplebbitAddress); - const selectValue = isInAllView ? 'all' : isInSubscriptionsView ? 'subs' : boardPath || subplebbitAddress; + const selectValue = isInAllView ? 'all' : isInSubscriptionsView ? 'subs' : isInModView ? 'mod' : boardPath || subplebbitAddress; const accountSubplebbitAddresses = useAccountsStore( (state) => {