{isInPostView || isInPendingPostPage ? (
<>
>
) : (
<>
{isInCatalogView ? (
) : (
)}
{!(isInAllView || isInSubscriptionsView || isInModView) &&
}
{isInCatalogView && searchText ? (
{' '}
— {t('search_results_for')}: {searchText}
) : (
isInCatalogView &&
filteredCount > 0 && (
{' '}
— {t('filtered_threads')}: {filteredCount}
)
)}
{isInCatalogView && (
<>
>
)}
>
)}
);
};
const PostPageStats = () => {
const { t } = useTranslation();
const params = useParams();
const location = useLocation();
const isInDescriptionView = isDescriptionView(location.pathname, params);
const resolvedAddress = useResolvedSubplebbitAddress();
const comment = useSubplebbitsPagesStore((state) => state.comments[params?.commentCid as string]);
const subplebbit = useSubplebbitsStore((state) => state.subplebbits[resolvedAddress as string]);
const descriptionReplyCount = location?.pathname.startsWith('/all/') ? 0 : subplebbit?.rules?.length > 0 ? 1 : 0;
const { closed, pinned, replyCount } = comment || {};
const linkCount = useCountLinksInReplies(comment);
const displayReplyCount = replyCount !== undefined ? replyCount.toString() : isInDescriptionView ? descriptionReplyCount : '?';
const replyCountTooltip = replyCount !== undefined || isInDescriptionView ? _.capitalize(t('replies')) : t('loading');
return (
{isInPostView || isInPendingPostPage ? (
<>
[
] [
] [
] [
]
>
) : (
<>
{isInCatalogView ? (
<>
[
]{' '}
>
) : (
<>
[
]{' '}
>
)}
[
]
{isInCatalogView && searchText ? (
{' '}
— {t('search_results_for')}: {searchText}
) : (
isInCatalogView &&
filteredCount > 0 && (
{' '}
— {t('filtered_threads')}: {filteredCount}
)
)}
{isInCatalogView && (
<>
>
)}
{(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