Remove old check in free answer comment rendering (#906)
This commit is contained in:
parent
30ce80d0c9
commit
faaf502114
|
@ -48,7 +48,6 @@ export function FeedAnswerCommentGroup(props: {
|
||||||
|
|
||||||
const answerElementId = `answer-${answer.id}`
|
const answerElementId = `answer-${answer.id}`
|
||||||
const commentsByCurrentUser = (user && commentsByUserId[user.id]) ?? []
|
const commentsByCurrentUser = (user && commentsByUserId[user.id]) ?? []
|
||||||
const isFreeResponseContractPage = !!commentsByCurrentUser
|
|
||||||
|
|
||||||
const scrollAndOpenReplyInput = useEvent(
|
const scrollAndOpenReplyInput = useEvent(
|
||||||
(comment?: ContractComment, answer?: Answer) => {
|
(comment?: ContractComment, answer?: Answer) => {
|
||||||
|
@ -95,20 +94,7 @@ export function FeedAnswerCommentGroup(props: {
|
||||||
<span className="whitespace-pre-line text-lg">
|
<span className="whitespace-pre-line text-lg">
|
||||||
<Linkify text={text} />
|
<Linkify text={text} />
|
||||||
</span>
|
</span>
|
||||||
|
<div className="sm:hidden">
|
||||||
{isFreeResponseContractPage && (
|
|
||||||
<div className="sm:hidden">
|
|
||||||
<button
|
|
||||||
className="text-xs font-bold text-gray-500 hover:underline"
|
|
||||||
onClick={() => scrollAndOpenReplyInput(undefined, answer)}
|
|
||||||
>
|
|
||||||
Reply
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Col>
|
|
||||||
{isFreeResponseContractPage && (
|
|
||||||
<div className="justify-initial hidden sm:block">
|
|
||||||
<button
|
<button
|
||||||
className="text-xs font-bold text-gray-500 hover:underline"
|
className="text-xs font-bold text-gray-500 hover:underline"
|
||||||
onClick={() => scrollAndOpenReplyInput(undefined, answer)}
|
onClick={() => scrollAndOpenReplyInput(undefined, answer)}
|
||||||
|
@ -116,7 +102,15 @@ export function FeedAnswerCommentGroup(props: {
|
||||||
Reply
|
Reply
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</Col>
|
||||||
|
<div className="justify-initial hidden sm:block">
|
||||||
|
<button
|
||||||
|
className="text-xs font-bold text-gray-500 hover:underline"
|
||||||
|
onClick={() => scrollAndOpenReplyInput(undefined, answer)}
|
||||||
|
>
|
||||||
|
Reply
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Col className="gap-3 pl-1">
|
<Col className="gap-3 pl-1">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user