No free comments on free response questions
This commit is contained in:
parent
6de12efa99
commit
ed139b6b2b
|
@ -286,6 +286,21 @@ export function getAllContractActivityItems(
|
|||
]
|
||||
: [{ type: 'description', id: '0', contract }]
|
||||
|
||||
if (outcomeType === 'FREE_RESPONSE') {
|
||||
items.push(
|
||||
...getAnswerGroups(
|
||||
contract as FullContract<DPM, FreeResponse>,
|
||||
bets,
|
||||
comments,
|
||||
user,
|
||||
{
|
||||
sortByProb: true,
|
||||
abbreviated,
|
||||
reversed,
|
||||
}
|
||||
)
|
||||
)
|
||||
} else {
|
||||
const commentsWithoutBets = comments
|
||||
.filter((comment) => !comment.betId)
|
||||
.map((comment) => ({
|
||||
|
@ -317,23 +332,7 @@ export function getAllContractActivityItems(
|
|||
return item.bets[0].createdTime
|
||||
}
|
||||
})
|
||||
|
||||
items.push(...sortedBetsAndComments)
|
||||
|
||||
if (outcomeType === 'FREE_RESPONSE') {
|
||||
items.push(
|
||||
...getAnswerGroups(
|
||||
contract as FullContract<DPM, FreeResponse>,
|
||||
bets,
|
||||
comments,
|
||||
user,
|
||||
{
|
||||
sortByProb: true,
|
||||
abbreviated,
|
||||
reversed,
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (contract.closeTime && contract.closeTime <= Date.now()) {
|
||||
|
|
|
@ -187,10 +187,11 @@ export function CommentInput(props: {
|
|||
}) {
|
||||
// see if we can comment input on any bet:
|
||||
const { contract, bets, commentsByBetId } = props
|
||||
const { outcomeType } = contract
|
||||
const user = useUser()
|
||||
const [comment, setComment] = useState('')
|
||||
|
||||
if (!user) {
|
||||
if (!user || outcomeType === 'FREE_RESPONSE') {
|
||||
return <div />
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user