@@ -11,6 +11,7 @@ import { useMedia, usePrevious, useUnmount } from "react-use";
1111import {
1212 defaultMaxComputeUnits ,
1313 lamportsPerSol ,
14+ nonBreakingSpace ,
1415 solDecimals ,
1516} from "../../../consts" ;
1617import { formatNumberLamports } from "../../Overview/ValidatorsCard/formatAmt" ;
@@ -48,7 +49,7 @@ export default function SlotCardGrid({ slot, currentSlot }: SlotCardGridProps) {
4849 } , [ deleteScroll , setScroll , slot ] ) ;
4950
5051 return (
51- < Flex minWidth = "0" >
52+ < Flex minWidth = "0" flexGrow = "1" >
5253 < SlotColumn slot = { slot } currentSlot = { currentSlot } />
5354 < div
5455 className = { styles . grid }
@@ -90,7 +91,6 @@ export default function SlotCardGrid({ slot, currentSlot }: SlotCardGridProps) {
9091 < Text
9192 className = { clsx ( styles . headerText , styles . computeUnitsHeader ) }
9293 align = "right"
93- style = { { gridColumnStart : "span 2" } }
9494 >
9595 Compute Units
9696 </ Text >
@@ -363,22 +363,18 @@ function SlotCardRow({ slot, active }: SlotCardRowProps) {
363363 { getText ( values ?. durationText ) }
364364 </ Text >
365365 { values ?. computeUnits !== undefined ? (
366- < >
367- < Text className = { valueClassName } align = "right" style = { { padding : 0 } } >
366+ < Text className = { valueClassName } align = "right" style = { { padding : 0 } } >
367+ < >
368368 { getText ( values ?. computeUnits . toLocaleString ( ) ) }
369- </ Text >
370- < Text className = { valueClassName } align = "right" style = { { padding : 0 } } >
371- { values ?. computeUnitsPct !== undefined
372- ? `\u00A0( ${ getText ( values ?. computeUnitsPct ) } %)`
373- : null }
374- </ Text >
375- </ >
369+ < span className = { styles . computeUnitsPct } >
370+ { values ?. computeUnitsPct !== undefined
371+ ? ` ${ nonBreakingSpace } ( ${ getText ( values ?. computeUnitsPct ) } %)`
372+ : null }
373+ </ span >
374+ </ >
375+ </ Text >
376376 ) : (
377- < Text
378- className = { valueClassName }
379- style = { { gridColumnStart : "span 2" } }
380- align = "right"
381- >
377+ < Text className = { valueClassName } align = "right" >
382378 { getText ( ) }
383379 </ Text >
384380 ) }
0 commit comments