I have tried multiplying the balance by the decimals and its still too long.
code:
import styles from '../styles/UserBalances.module.css';
export default function UserBalances(props) {
const RawData = props.data;
const ConstructorData = [];
const GetData = () => {
if(RawData == null) {
console.log('null')
} else {
for( let i = 0; i < RawData.length; i++) {
ConstructorData.push(RawData[i])
}
}
}
GetData()
return(
<div className={styles.UserBalanceWrapper}>
{
ConstructorData.length === 0 ? (
<p>Refresh For Data</p>
): (
<div>
{ConstructorData.map((ConstructorData) => {
return(
<div className={styles.DataBoxWrapper}>
<p className={ styles.Name }>{ConstructorData.name}</p>
<p className={ styles.Balance }>{ ConstructorData.balance }</p>
<p className={ styles.Address }>{ConstructorData.token_address}</p>
</div>
);
})}
</div>
)
}
</div>
);
}
that is the code that gives the result you see in the photo now im wondering how i can format it correctly.
thank you!