2018-02-03 15:26:49 +01:00
|
|
|
import React from 'react'
|
2018-02-07 18:50:32 +01:00
|
|
|
import { Button, Card } from 'semantic-ui-react'
|
2018-02-04 19:24:51 +01:00
|
|
|
import { Link } from 'react-router-dom'
|
2018-02-07 18:50:32 +01:00
|
|
|
import { shortenAddress } from '../utils/orbitdb'
|
2018-02-03 15:26:49 +01:00
|
|
|
|
2018-02-07 18:50:32 +01:00
|
|
|
export default function BoardsItem({ address, title }) {
|
2018-02-07 23:00:50 +01:00
|
|
|
return <Card fluid>
|
2018-02-07 18:50:32 +01:00
|
|
|
<Card.Content>
|
|
|
|
<Card.Header>
|
2018-02-07 23:00:50 +01:00
|
|
|
{ title || 'Unnamed board' }
|
2018-02-07 18:50:32 +01:00
|
|
|
</Card.Header>
|
|
|
|
<Card.Meta>
|
|
|
|
Board
|
|
|
|
</Card.Meta>
|
2018-02-07 23:00:50 +01:00
|
|
|
</Card.Content>
|
|
|
|
<Card.Content>
|
2018-02-07 18:50:32 +01:00
|
|
|
<Card.Description style={{wordBreak:'break-all'}}>
|
|
|
|
{address}
|
|
|
|
</Card.Description>
|
|
|
|
</Card.Content>
|
|
|
|
<Card.Content extra>
|
|
|
|
<Button as={Link} to={shortenAddress(address)} basic fluid>View</Button>
|
|
|
|
</Card.Content>
|
|
|
|
</Card>
|
2018-02-03 15:26:49 +01:00
|
|
|
}
|