1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-03-15 22:18:37 +01:00
ipfs-boards/src/components/BoardsItem.js

23 lines
730 B
JavaScript
Raw Normal View History

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 }) {
return <Card>
<Card.Content>
<Card.Header>
{ title || 'Untitled board' }
</Card.Header>
<Card.Meta>
Board
</Card.Meta>
<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
}