|
|
@@ -13,6 +13,7 @@ import { useCommentForCurrentPageOptions } from '~/stores/renderer';
|
|
|
import { ICommentHasId, ICommentHasIdList } from '../interfaces/comment';
|
|
|
import { useSWRxPageComment } from '../stores/comment';
|
|
|
|
|
|
+import { NotAvailableForGuest } from './NotAvailableForGuest';
|
|
|
import { Comment } from './PageComment/Comment';
|
|
|
import { CommentEditor } from './PageComment/CommentEditor';
|
|
|
import { DeleteCommentModal } from './PageComment/DeleteCommentModal';
|
|
|
@@ -173,19 +174,21 @@ export const PageComment: FC<PageCommentProps> = memo((props:PageCommentProps):
|
|
|
{commentElement(comment)}
|
|
|
{hasReply && replyCommentsElement(allReplies[comment._id])}
|
|
|
{(!isReadOnly && !showEditorIds.has(comment._id)) && (
|
|
|
- <div className="text-right">
|
|
|
- <Button
|
|
|
- outline
|
|
|
- color="secondary"
|
|
|
- size="sm"
|
|
|
- className="btn-comment-reply"
|
|
|
- onClick={() => {
|
|
|
- setShowEditorIds(previousState => new Set(previousState.add(comment._id)));
|
|
|
- }}
|
|
|
- >
|
|
|
- <i className="icon-fw icon-action-undo"></i> Reply
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
+ <NotAvailableForGuest>
|
|
|
+ <div className="text-right">
|
|
|
+ <Button
|
|
|
+ outline
|
|
|
+ color="secondary"
|
|
|
+ size="sm"
|
|
|
+ className="btn-comment-reply"
|
|
|
+ onClick={() => {
|
|
|
+ setShowEditorIds(previousState => new Set(previousState.add(comment._id)));
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <i className="icon-fw icon-action-undo"></i> Reply
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </NotAvailableForGuest>
|
|
|
)}
|
|
|
{(!isReadOnly && showEditorIds.has(comment._id)) && (
|
|
|
<CommentEditor
|