9d19b5e606
* refactor: simplified accounting, removed cashing out * feat: load uncashed amounts for all pears that have settlement * feat: added cashout button * refactor: changed accounting to work with current version of bee * chore: addressed PR review comments * chore: simplified the uncashed expression in balance table
24 lines
573 B
TypeScript
24 lines
573 B
TypeScript
import type { ReactElement } from 'react'
|
|
import { Typography } from '@material-ui/core'
|
|
|
|
function truncStringPortion(str: string, firstCharCount = 10, endCharCount = 10) {
|
|
return `${str.substring(0, firstCharCount)}...${str.substring(str.length - endCharCount, str.length)}`
|
|
}
|
|
|
|
interface Props {
|
|
peerId: string
|
|
}
|
|
|
|
export default function PeerDetail(props: Props): ReactElement {
|
|
return (
|
|
<Typography
|
|
variant="button"
|
|
style={{
|
|
fontFamily: 'monospace, monospace',
|
|
}}
|
|
>
|
|
{truncStringPortion(props.peerId)}
|
|
</Typography>
|
|
)
|
|
}
|