mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
revert "hidden threads" feat, must wait for 'filterHidden: false' API
This commit is contained in:
@@ -3,8 +3,6 @@ import { Link, useLocation, useParams } from 'react-router-dom';
|
||||
import { useAccountComment, useSubscribe } from '@plebbit/plebbit-react-hooks';
|
||||
import styles from './board-buttons.module.css';
|
||||
import { isAllView, isCatalogView, isPendingPostView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils';
|
||||
import useBlockedComments from '../../hooks/use-blocked-comments';
|
||||
import useBlockedCommentsStore from '../../stores/useBlockedCommentsStore';
|
||||
|
||||
interface BoardButtonsProps {
|
||||
isInAllView?: boolean;
|
||||
@@ -107,9 +105,6 @@ export const DesktopBoardButtons = () => {
|
||||
const isInPostView = isPostPageView(location.pathname, params);
|
||||
const isInSubscriptionsView = isSubscriptionsView(location.pathname);
|
||||
|
||||
const { showBlockedComments, setShowBlockedComments } = useBlockedCommentsStore();
|
||||
const blockedComments = useBlockedComments(params?.subplebbitAddress);
|
||||
|
||||
return (
|
||||
<div className={styles.desktopBoardButtons}>
|
||||
<hr />
|
||||
@@ -125,16 +120,6 @@ export const DesktopBoardButtons = () => {
|
||||
<>
|
||||
[<OptionsButton />] [
|
||||
<CatalogButton address={subplebbitAddress} isInAllView={isInAllView} isInCatalogView={isInCatalogView} isInSubscriptionsView={isInSubscriptionsView} />]
|
||||
{blockedComments?.length > 0 && (
|
||||
<span className={styles.blockedAddresses}>
|
||||
{' '}
|
||||
— Hidden threads: <strong>{blockedComments.length}</strong> [
|
||||
<span className={styles.showBlockedButton} onClick={() => setShowBlockedComments(!showBlockedComments)}>
|
||||
{showBlockedComments ? 'Back' : 'Show'}
|
||||
</span>
|
||||
]
|
||||
</span>
|
||||
)}
|
||||
{!(isInAllView || isInSubscriptionsView) && (
|
||||
<span className={styles.subscribeButton}>
|
||||
[<SubscribeButton address={subplebbitAddress} />]
|
||||
|
||||
Reference in New Issue
Block a user