parent
c45893cf09
commit
dd6167aae8
|
@ -14,7 +14,7 @@ const formatField = field => ({
|
||||||
commitTime: convertToHours(field.commitTime),
|
commitTime: convertToHours(field.commitTime),
|
||||||
canceled: cancelText(field.canceled)
|
canceled: cancelText(field.canceled)
|
||||||
})
|
})
|
||||||
const FunderProfilesTable = ({ data, cancelFundProfile, profiles }) => (
|
const FunderProfilesTable = ({ cancelFundProfile, profiles }) => (
|
||||||
<FundingContext.Consumer>
|
<FundingContext.Consumer>
|
||||||
{({ account }) =>
|
{({ account }) =>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
|
|
@ -7,13 +7,15 @@ import AddFunder from './AddFunder'
|
||||||
import CreateFunding from './CreateFunding'
|
import CreateFunding from './CreateFunding'
|
||||||
|
|
||||||
const FundsManagement = ({ open }) => {
|
const FundsManagement = ({ open }) => {
|
||||||
const maxWidth = open ? `${window.visualViewport.width - 35}px` : '100vw'
|
const windowWidth = window.visualViewport.width
|
||||||
|
const maxWidth = open ? `${windowWidth * 0.80}px` : '100vw'
|
||||||
|
const WebkitTransition = 'all 0.25s ease-out 0s'
|
||||||
return (
|
return (
|
||||||
<FundingContext.Consumer>
|
<FundingContext.Consumer>
|
||||||
{({ allPledges, appendPledges, appendFundProfile, transferPledgeAmounts, fundProfiles, cancelFundProfile }) =>
|
{({ allPledges, appendPledges, appendFundProfile, transferPledgeAmounts, fundProfiles, cancelFundProfile }) =>
|
||||||
<div style={{ maxWidth }}>
|
<div style={{ maxWidth, WebkitTransition }}>
|
||||||
<PledgesTable data={allPledges} transferPledgeAmounts={transferPledgeAmounts} fundProfiles={fundProfiles} />
|
<PledgesTable data={allPledges} transferPledgeAmounts={transferPledgeAmounts} fundProfiles={fundProfiles} />
|
||||||
<FunderProfilesTable data={fundProfiles} cancelFundProfile={cancelFundProfile}/>
|
<FunderProfilesTable cancelFundProfile={cancelFundProfile}/>
|
||||||
<AddFunder appendFundProfile={appendFundProfile} />
|
<AddFunder appendFundProfile={appendFundProfile} />
|
||||||
<Divider variant="middle" />
|
<Divider variant="middle" />
|
||||||
<CreateFunding refreshTable={appendPledges} />
|
<CreateFunding refreshTable={appendPledges} />
|
||||||
|
|
|
@ -47,9 +47,6 @@ const styles = theme => ({
|
||||||
appBarBg: {
|
appBarBg: {
|
||||||
backgroundColor: '#111735'
|
backgroundColor: '#111735'
|
||||||
},
|
},
|
||||||
childrenShift: {
|
|
||||||
width: `calc(100% - ${drawerWidth}px)`
|
|
||||||
},
|
|
||||||
menuButton: {
|
menuButton: {
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 20,
|
marginRight: 20,
|
||||||
|
@ -195,9 +192,7 @@ class PersistentDrawerLeft extends React.Component {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className={classes.drawerHeader} />
|
<div className={classes.drawerHeader} />
|
||||||
<div className={classNames(classes.appBar, {
|
<div className={classNames(classes.appBar)}>
|
||||||
[classes.childrenShift]: open,
|
|
||||||
})}>
|
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path="/(|dashboard)" component={Dashboard} />
|
<Route path="/(|dashboard)" component={Dashboard} />
|
||||||
<Route path="/admin" component={ContractAdmin} />
|
<Route path="/admin" component={ContractAdmin} />
|
||||||
|
|
Loading…
Reference in New Issue