fix boost hint for comments
This commit is contained in:
		
							parent
							
								
									d17929f2c5
								
							
						
					
					
						commit
						e323ed27c6
					
				| @ -107,6 +107,7 @@ export function BoostItemInput ({ item, sub, act = false, ...props }) { | ||||
|   }, [boost, item?.id]) | ||||
| 
 | ||||
|   const boostMessage = useMemo(() => { | ||||
|     if (!item?.parentId) { | ||||
|       if (data?.boostPosition?.home || data?.boostPosition?.sub) { | ||||
|         const boostPinning = [] | ||||
|         if (data?.boostPosition?.home) { | ||||
| @ -116,11 +117,12 @@ export function BoostItemInput ({ item, sub, act = false, ...props }) { | ||||
|           boostPinning.push(`~${item?.subName || sub?.name}`) | ||||
|         } | ||||
|         return `pins to the top of ${boostPinning.join(' and ')}` | ||||
|     } else if (boost >= 0 && boost % BOOST_MULT === 0) { | ||||
|       return `${act ? 'brings to' : 'equivalent to'} ${numWithUnits(boost / BOOST_MULT, { unitPlural: 'zapvotes', unitSingular: 'zapvote' })}` | ||||
|     } else { | ||||
|       return 'ranks posts higher based on the amount' | ||||
|       } | ||||
|     } | ||||
|     if (boost >= 0 && boost % BOOST_MULT === 0) { | ||||
|       return `${act ? 'brings to' : 'equivalent to'} ${numWithUnits(boost / BOOST_MULT, { unitPlural: 'zapvotes', unitSingular: 'zapvote' })}` | ||||
|     } | ||||
|     return 'ranks posts higher based on the amount' | ||||
|   }, [boost, data?.boostPosition?.home, data?.boostPosition?.sub, item?.subName, sub?.name]) | ||||
| 
 | ||||
|   return ( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user