mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
Hide reply input if no comment permissions (#22955)
GitOrigin-RevId: eeb323e8d7426388f4291906299397f58095b46a
This commit is contained in:
committed by
Copybot
parent
741b65d0eb
commit
1072f836ae
+3
-1
@@ -11,6 +11,7 @@ import {
|
||||
CommentId,
|
||||
ThreadId,
|
||||
} from '../../../../../types/review-panel/review-panel'
|
||||
import { usePermissionsContext } from '@/features/ide-react/context/permissions-context'
|
||||
|
||||
export const ReviewPanelCommentContent = memo<{
|
||||
comment: Change<CommentOperation>
|
||||
@@ -36,6 +37,7 @@ export const ReviewPanelCommentContent = memo<{
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const threads = useThreadsContext()
|
||||
const permissions = usePermissionsContext()
|
||||
|
||||
const handleSubmit = useCallback(
|
||||
(content, setContent) => onReply?.(content).then(() => setContent('')),
|
||||
@@ -90,7 +92,7 @@ export const ReviewPanelCommentContent = memo<{
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!isResolved && (
|
||||
{permissions.comment && !isResolved && (
|
||||
<AutoExpandingTextArea
|
||||
name="content"
|
||||
className="review-panel-comment-input"
|
||||
|
||||
Reference in New Issue
Block a user