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]) |   }, [boost, item?.id]) | ||||||
| 
 | 
 | ||||||
|   const boostMessage = useMemo(() => { |   const boostMessage = useMemo(() => { | ||||||
|  |     if (!item?.parentId) { | ||||||
|       if (data?.boostPosition?.home || data?.boostPosition?.sub) { |       if (data?.boostPosition?.home || data?.boostPosition?.sub) { | ||||||
|         const boostPinning = [] |         const boostPinning = [] | ||||||
|         if (data?.boostPosition?.home) { |         if (data?.boostPosition?.home) { | ||||||
| @ -116,11 +117,12 @@ export function BoostItemInput ({ item, sub, act = false, ...props }) { | |||||||
|           boostPinning.push(`~${item?.subName || sub?.name}`) |           boostPinning.push(`~${item?.subName || sub?.name}`) | ||||||
|         } |         } | ||||||
|         return `pins to the top of ${boostPinning.join(' and ')}` |         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]) |   }, [boost, data?.boostPosition?.home, data?.boostPosition?.sub, item?.subName, sub?.name]) | ||||||
| 
 | 
 | ||||||
|   return ( |   return ( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user