Don't prompt to comment on FR bets, arrow spacing

This commit is contained in:
Ian Philips 2022-06-23 16:09:26 -05:00
parent b5810481d0
commit 17ac6c58b2
2 changed files with 2 additions and 18 deletions

View File

@ -88,26 +88,11 @@ export function FeedAnswerCommentGroup(props: {
} }
) )
useEffect(() => {
if (
mostRecentCommentableBet &&
usersMostRecentBetTimeAtLoad !== undefined &&
mostRecentCommentableBet.createdTime > usersMostRecentBetTimeAtLoad &&
!showReply
)
scrollAndOpenReplyInput(undefined, answer)
}, [
answer,
usersMostRecentBetTimeAtLoad,
mostRecentCommentableBet,
scrollAndOpenReplyInput,
showReply,
])
useEffect(() => { useEffect(() => {
// Only show one comment input for a bet at a time // Only show one comment input for a bet at a time
if ( if (
betsByCurrentUser.length > 1 && betsByCurrentUser.length > 1 &&
inputRef?.textContent?.length === 0 &&
betsByCurrentUser.sort((a, b) => b.createdTime - a.createdTime)[0] betsByCurrentUser.sort((a, b) => b.createdTime - a.createdTime)[0]
?.outcome !== answer.number.toString() ?.outcome !== answer.number.toString()
) )

View File

@ -530,8 +530,7 @@ export function CommentInputTextArea(props: {
{user && !isSubmitting && ( {user && !isSubmitting && (
<button <button
className={clsx( className={clsx(
'btn btn-ghost btn-sm absolute right-2 flex-row pl-2 capitalize', 'btn btn-ghost btn-sm absolute right-2 bottom-2 flex-row pl-2 capitalize',
isReply ? ' bottom-4' : ' bottom-2',
!commentText && 'pointer-events-none text-gray-500' !commentText && 'pointer-events-none text-gray-500'
)} )}
onClick={() => { onClick={() => {