Files
bee-dashboard/src/pages/accounting/PeerDetail.tsx
T
Vojtech Simetka 9d19b5e606 feat: cashing out for each peer and single page accounting (#69)
* 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
2021-04-19 16:17:11 +02:00

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>
)
}