add initial create project page and route

This commit is contained in:
Barry Gitarts 2019-04-01 13:48:53 -04:00 committed by Barry G
parent 2f31a8a8a1
commit 9f7db83d1d
3 changed files with 53 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import TransferGraph from './TransfersGraph'
import Dashboard from './Dashboard'
import Project from './projects/Project'
import BackProject from './projects/BackProject'
import CreateProject from './projects/CreateProject'
const drawerWidth = 240
@ -201,6 +202,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="/create-project/" component={CreateProject} />
<Route path="/back-project/:id" component={BackProject} />
</Switch>
{this.props.children}

View File

@ -185,7 +185,6 @@ function BackProject({classes, match, profile, delegates, projectAddedEvents, de
)
}
//TODO get all pledges for a delegate profile
const StyledProject = withStyles(styles)(BackProject)
export default withDatabase(withObservables([], ({ database, match }) => ({
profile: database.collections.get('profiles').query(

View File

@ -0,0 +1,51 @@
import React from 'react'
import Divider from '@material-ui/core/Divider'
import { withStyles } from '@material-ui/core/styles'
const styles = theme => ({
root: {
display: 'grid',
gridTemplateColumns: 'repeat(12, [col] 1fr)',
gridTemplateRows: 'repeat(5, [row] auto)',
gridColumnGap: '1em',
gridRowGap: '36px',
fontFamily: theme.typography.fontFamily,
[theme.breakpoints.up('sm')]: {
margin: '1.75rem 4.5rem'
}
},
title: {
display: 'grid',
fontSize: '2.5rem',
gridColumnStart: '1',
gridColumnEnd: '13',
gridRowStart: '1',
gridRowEnd: '6',
textAlign: 'center'
},
submissionRoot: {
gridColumnStart: '1',
gridColumnEnd: '13'
},
textField: {
width: '100%'
}
})
const Title = ({ className }) => (
<div className={className}>
<div style={{ alignSelf: 'center' }}>Create Project</div>
<Divider />
</div>
)
function CreateProject({ classes }) {
return (
<div className={classes.root}>
<Title className={classes.title} />
</div>
)
}
const StyledProject = withStyles(styles)(CreateProject)
export default StyledProject