add link to back-project page
This commit is contained in:
parent
ad991066d7
commit
5e52dd2ce7
|
@ -24,6 +24,7 @@ import ContractAdmin from './ContractAdmin'
|
|||
import TransferGraph from './TransfersGraph'
|
||||
import Dashboard from './Dashboard'
|
||||
import Project from './projects/Project'
|
||||
import BackProject from './projects/BackProject'
|
||||
|
||||
const drawerWidth = 240
|
||||
|
||||
|
@ -88,7 +89,7 @@ const styles = theme => ({
|
|||
link: {
|
||||
textDecoration: 'none'
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
class PersistentDrawerLeft extends React.Component {
|
||||
state = {
|
||||
|
@ -200,6 +201,7 @@ class PersistentDrawerLeft extends React.Component {
|
|||
<Route path="/funds-management" render={() => <FundsManagement open={open} />} />
|
||||
<Route path="/insights" component={TransferGraph} />
|
||||
<Route path="/project/:id" component={Project} />
|
||||
<Route path="/back-project/:id" component={BackProject} />
|
||||
</Switch>
|
||||
{this.props.children}
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import React, { useMemo, useState, useEffect } from 'react'
|
||||
|
||||
function BackProject({match}) {
|
||||
const projectId = match.params.id
|
||||
console.log({projectId})
|
||||
return (
|
||||
<div>Back Project Page</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default BackProject
|
|
@ -1,5 +1,6 @@
|
|||
import web3 from 'Embark/web3'
|
||||
import React, { useMemo, useState, useEffect } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import Button from '@material-ui/core/Button'
|
||||
import withObservables from '@nozbe/with-observables'
|
||||
|
@ -84,6 +85,9 @@ const styles = theme => ({
|
|||
},
|
||||
linearBarColorPrimary: {
|
||||
backgroundColor: theme.palette.primary.main
|
||||
},
|
||||
link: {
|
||||
textDecoration: 'none'
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -240,7 +244,9 @@ function Project({ classes, match, profile, transfers, pledges, projectAddedEven
|
|||
<span className={classes.infoText}>{projectAge}</span>
|
||||
<span className={classes.subtext}>days active</span>
|
||||
</div>
|
||||
<Button color="primary" variant="contained" style={{ height: '50px' }}>Back this project</Button>
|
||||
<Link to={`/back-project/${projectId}`} className={classes.link}>
|
||||
<Button color="primary" variant="contained" style={{ height: '50px', width: '100%' }}>Back this project</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue