Don't prompt to comment on FR bets, arrow spacing
This commit is contained in:
		
							parent
							
								
									b5810481d0
								
							
						
					
					
						commit
						17ac6c58b2
					
				|  | @ -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() | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|  | @ -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={() => { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user