Update board-buttons.tsx

This commit is contained in:
plebeius.eth
2024-04-28 17:44:21 +02:00
parent a949b5096a
commit ff70533e44
@@ -58,6 +58,7 @@ export const MobileBoardButtons = () => {
const accountComment = useAccountComment({ commentIndex: params?.accountCommentIndex as any }); const accountComment = useAccountComment({ commentIndex: params?.accountCommentIndex as any });
const subplebbitAddress = params?.subplebbitAddress || accountComment?.subplebbitAddress; const subplebbitAddress = params?.subplebbitAddress || accountComment?.subplebbitAddress;
const isInPostPage = isPostPageView(location.pathname, params); const isInPostPage = isPostPageView(location.pathname, params);
const isInCatalogView = isCatalogView(location.pathname, params);
const isInPendingPostPage = isPendingPostView(location.pathname, params); const isInPendingPostPage = isPendingPostView(location.pathname, params);
return ( return (
@@ -75,7 +76,7 @@ export const MobileBoardButtons = () => {
) : ( ) : (
<> <>
<OptionsButton /> <OptionsButton />
<CatalogButton address={subplebbitAddress} /> <CatalogButton address={subplebbitAddress} isInCatalogView={isInCatalogView} />
<SubscribeButton address={subplebbitAddress} /> <SubscribeButton address={subplebbitAddress} />
</> </>
)} )}
@@ -97,7 +98,7 @@ export const DesktopBoardButtons = () => {
<hr /> <hr />
{isInPostPage || isInPendingPostPage ? ( {isInPostPage || isInPendingPostPage ? (
<> <>
[<ReturnButton address={subplebbitAddress} />] [<CatalogButton address={subplebbitAddress} isInCatalogView={isInCatalogView} />] [<BottomButton />] [ [<ReturnButton address={subplebbitAddress} />] [<CatalogButton address={subplebbitAddress} />] [<BottomButton />] [
<OptionsButton />] <OptionsButton />]
<span className={styles.subscribeButton}> <span className={styles.subscribeButton}>
[<SubscribeButton address={subplebbitAddress} />] [<SubscribeButton address={subplebbitAddress} />]