import React from 'react'; import { randomIntFromInterval, generateText } from '../utils'; interface IPlaceholderDisplayName { maxLength: number, minLength: number, withSuffix?: boolean, } /** Fake display name to show when data is loading. */ const PlaceholderDisplayName: React.FC = ({ minLength, maxLength, withSuffix = true }) => { const length = randomIntFromInterval(maxLength, minLength); const acctLength = randomIntFromInterval(maxLength, minLength); return (

{generateText(length)}

{withSuffix &&

{generateText(acctLength)}

}
); }; export default PlaceholderDisplayName;