1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-26 15:04:19 +01:00
ipfs-boards/pages/index.js

45 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2019-10-22 22:08:59 +02:00
import React from 'react'
2019-10-22 23:38:21 +02:00
import { Fab, Card, CardActions, CardHeader, Button } from '@material-ui/core'
2019-11-13 01:02:56 +01:00
import { makeStyles } from '@material-ui/core/styles'
2019-10-22 23:38:21 +02:00
import AddIcon from '@material-ui/icons/Add'
import ViewIcon from '@material-ui/icons/Visibility'
import DeleteIcon from '@material-ui/icons/Delete'
2019-10-26 23:58:20 +02:00
import Link from 'next/link'
import Router from 'next/router'
2019-10-22 22:08:59 +02:00
2019-11-13 01:02:56 +01:00
const useStyles = makeStyles(theme => ({
fab: {
float: 'right',
marginTop: theme.spacing(2)
},
}))
2019-10-22 23:38:21 +02:00
const Home = () => {
2019-11-13 01:02:56 +01:00
const styles = useStyles()
2019-10-22 23:38:21 +02:00
return (
<React.Fragment>
<Card>
<CardHeader
2019-10-26 23:58:20 +02:00
title="Test Board"
2019-10-22 23:38:21 +02:00
subheader="Last Activity X time ago"
/>
<CardActions>
2019-10-26 23:58:20 +02:00
<Button variant="contained" color="primary" onClick={() => Router.push(`/b/test`)}>
2019-10-22 23:38:21 +02:00
<ViewIcon /> View
</Button>
<Button variant="contained" color="secondary">
<DeleteIcon /> Remove
</Button>
</CardActions>
</Card>
2019-10-26 23:58:20 +02:00
<Link href="/b/open">
2019-11-13 01:02:56 +01:00
<Fab color="primary" className={styles.fab}>
<AddIcon />
</Fab>
2019-10-26 23:58:20 +02:00
</Link>
2019-10-22 23:38:21 +02:00
</React.Fragment>
)
}
2019-10-22 22:08:59 +02:00
export default Home