mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): move failed publish notice into comment body (#1066)
Align the failed notice and delete action with the existing post card and footer controls.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Fragment, useMemo, useState } from 'react';
|
||||
import { Fragment, type ReactNode, useMemo, useState } from 'react';
|
||||
import { useLocation, useParams } from 'react-router-dom';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
import { Comment, useComment } from '@bitsocialnet/bitsocial-react-hooks';
|
||||
@@ -62,7 +62,7 @@ const useScopedCidToNumber = (cids: string[]) => {
|
||||
return cidToNumber;
|
||||
};
|
||||
|
||||
const CommentContent = ({ comment: post }: { comment: Comment }) => {
|
||||
const CommentContent = ({ comment: post, prependContent }: { comment: Comment; prependContent?: ReactNode }) => {
|
||||
const { t } = useTranslation();
|
||||
const params = useParams();
|
||||
const location = useLocation();
|
||||
@@ -126,6 +126,12 @@ const CommentContent = ({ comment: post }: { comment: Comment }) => {
|
||||
|
||||
return (
|
||||
<blockquote className={`${styles.postMessage} ${!isReply && isMobile && styles.clampLines}`}>
|
||||
{prependContent && (
|
||||
<>
|
||||
{prependContent}
|
||||
<br />
|
||||
</>
|
||||
)}
|
||||
{isReply &&
|
||||
!hasFailedState &&
|
||||
!(deleted || removed || purged) &&
|
||||
|
||||
Reference in New Issue
Block a user