import { useTranslation } from 'react-i18next'; import { useLocation, useParams } from 'react-router-dom'; import { isAllView, isSubscriptionsView, isModView } from '../../lib/utils/view-utils'; import useReplyModalStore from '../../stores/use-reply-modal-store'; import { ReturnButton, CatalogButton, TopButton, UpdateButton, AutoButton, PostPageStats } from '../board-buttons/board-buttons'; import styles from './thread-footer-first-row.module.css'; export interface ThreadFooterFirstRowProps { postCid: string; threadNumber: number | undefined; subplebbitAddress: string; /** Thread closed - disable Post a Reply */ isThreadClosed?: boolean; } const ThreadFooterFirstRow = ({ postCid, threadNumber, subplebbitAddress, isThreadClosed = false }: ThreadFooterFirstRowProps) => { const { t } = useTranslation(); const location = useLocation(); const params = useParams(); const { openReplyModalEmpty } = useReplyModalStore(); const isInAllView = isAllView(location.pathname); const isInSubscriptionsView = isSubscriptionsView(location.pathname, params); const isInModView = isModView(location.pathname); const handlePostReplyClick = () => { if (isThreadClosed) return; openReplyModalEmpty(postCid, threadNumber, subplebbitAddress); }; return (
[] [ ] [ ] [] []
[ ]
); }; export default ThreadFooterFirstRow;