{isInPostView || isInPendingPostPage ? (
<>
{showVoteButton &&
}
>
) : isInModQueueView ? (
<>
>
) : (
<>
{isInCatalogView ? (
) : (
)}
{showVoteButton &&
}
{!(isInAllView || isInSubscriptionsView || isInModView) &&
}
{isInCatalogView && searchText ? (
{' '}
— {t('search_results_for')}: {searchText}
) : (
isInCatalogView &&
filteredCount > 0 && (
{' '}
— {t('filtered_threads')}: {filteredCount}
)
)}
{isInAllView && (
<>
>
)}
{isInCatalogView && (
<>
>
)}
>
)}
);
};
const PostPageStats = () => {
const { t } = useTranslation();
const params = useParams();
const comment = useSubplebbitsPagesStore((state) => state.comments[params?.commentCid as string]);
const { closed, pinned, replyCount } = comment || {};
const linkCount = useCountLinksInReplies(comment);
const displayReplyCount = replyCount !== undefined ? replyCount.toString() : '?';
const replyCountTooltip = replyCount !== undefined ? _.capitalize(t('replies')) : t('loading');
return (
{isInPostView || isInPendingPostPage ? (
<>
[
] [
] [
] [
]
>
) : isInModQueueView ? (
<>
[
] [
]
>
) : (
<>
{isInCatalogView ? (
<>
[
]{' '}
>
) : (
<>
[
]{' '}
>
)}
[
]
{showVoteButton && (
<>
{' '}
[
]
>
)}
{isInCatalogView && searchText ? (
{' '}
— {t('search_results_for')}: {searchText}
) : (
isInCatalogView &&
filteredCount > 0 && (
{' '}
— {t('filtered_threads')}: {filteredCount}
)
)}
{isInCatalogView && (
<>
>
)}
{isInAllView && }
{(isInAllView || isInSubscriptionsView || isInModView) && (
)}
{!(isInAllView || isInSubscriptionsView || isInModView) && (
<>
[
]
>
)}{' '}
{isInCatalogView && (
<>
[]
>
)}
>
)}
>
);
};
const SearchOPsBar = () => {
const { t } = useTranslation();
const navigate = useNavigate();
const params = useParams();
const location = useLocation();
const isInAllView = isAllView(location.pathname);
const isInSubscriptionsView = isSubscriptionsView(location.pathname, useParams());
const isInModView = isModView(location.pathname);
const defaultSubplebbits = useDefaultSubplebbits();
const resolvedAddress = useResolvedSubplebbitAddress();
const boardPath = resolvedAddress ? getBoardPath(resolvedAddress, defaultSubplebbits) : params?.boardIdentifier || params?.subplebbitAddress;
const handleSearch = (event: React.KeyboardEvent