fix(board-buttons): hide catalog controls on flash upload boards

Flash boards do not use catalog view, so hide catalog links and OP search
without leaving empty bracket placeholders in desktop board controls.
This commit is contained in:
Tommaso Casaburi
2026-06-01 12:42:21 +07:00
parent d3b5c40321
commit b686def1a1
12 changed files with 181 additions and 35 deletions
+3 -7
View File
@@ -3,7 +3,7 @@ import { Link, useParams } from 'react-router-dom';
import { useFeed, useCommunity } from '@bitsocial/bitsocial-react-hooks';
import { useTranslation } from 'react-i18next';
import { shouldShowSnow } from '../../lib/snow';
import { BottomButton, CatalogButton, ReturnButton, TopButton } from '../../components/board-buttons/board-buttons';
import { BottomButton, BracketedCatalogButton, CatalogButton, ReturnButton, TopButton } from '../../components/board-buttons/board-buttons';
import ErrorDisplay from '../../components/error-display/error-display';
import { PageFooterDesktop, PageFooterMobile, ThreadFooterStyleRow } from '../../components/footer';
import LoadingEllipsis from '../../components/loading-ellipsis';
@@ -106,9 +106,7 @@ const ArchiveDesktopTopControls = ({ communityAddress }: { communityAddress: str
<span>
[<ReturnButton address={communityAddress} />]
</span>
<span>
[<CatalogButton address={communityAddress} />]
</span>
<BracketedCatalogButton address={communityAddress} />
<span>
[<BottomButton />]
</span>
@@ -120,9 +118,7 @@ const ArchiveDesktopFooterControls = ({ communityAddress }: { communityAddress:
<span>
[<ReturnButton address={communityAddress} />]
</span>
<span>
[<CatalogButton address={communityAddress} />]
</span>
<BracketedCatalogButton address={communityAddress} />
<span>
[<TopButton />]
</span>
+3 -7
View File
@@ -3,7 +3,7 @@ import { Link, Navigate, useParams } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { useCommunity } from '@bitsocial/bitsocial-react-hooks';
import { shouldShowSnow } from '../../lib/snow';
import { BottomButton, CatalogButton, ReturnButton, TopButton } from '../../components/board-buttons/board-buttons';
import { BottomButton, BracketedCatalogButton, CatalogButton, ReturnButton, TopButton } from '../../components/board-buttons/board-buttons';
import { PageFooterDesktop, PageFooterMobile, ThreadFooterStyleRow } from '../../components/footer';
import LoadingEllipsis from '../../components/loading-ellipsis';
import Tooltip from '../../components/tooltip';
@@ -49,9 +49,7 @@ const DirectoryDesktopTopControls = ({ communityAddress }: { communityAddress: s
<span>
[<ReturnButton address={communityAddress} />]
</span>
<span>
[<CatalogButton address={communityAddress} />]
</span>
<BracketedCatalogButton address={communityAddress} />
<span>
[<BottomButton />]
</span>
@@ -63,9 +61,7 @@ const DirectoryDesktopFooterControls = ({ communityAddress }: { communityAddress
<span>
[<ReturnButton address={communityAddress} />]
</span>
<span>
[<CatalogButton address={communityAddress} />]
</span>
<BracketedCatalogButton address={communityAddress} />
<span>
[<TopButton />]
</span>