diff --git a/src/routes/open/components/SafeOwnersForm/index.jsx b/src/routes/open/components/SafeOwnersForm/index.jsx index 0269726b..942cae15 100644 --- a/src/routes/open/components/SafeOwnersForm/index.jsx +++ b/src/routes/open/components/SafeOwnersForm/index.jsx @@ -23,6 +23,7 @@ type Props = { classes: Object, otherAccounts: string[], errors: Object, + // updateInitialProps: () => void, } type State = { @@ -68,6 +69,19 @@ class SafeOwners extends React.Component { numOwners: 3, } + // eslint-disable-next-line + onRemoveRow = (index: number) => () => { + /* + this.props.updateInitialProps({ + owner0Address: 'moeFeo', + }) + */ + + this.setState(state => ({ + numOwners: state.numOwners - 1, + })) + } + render() { const { classes, errors, otherAccounts } = this.props const { numOwners } = this.state @@ -81,12 +95,8 @@ class SafeOwners extends React.Component { - - NAME - - - ADDRESS - + NAME + ADDRESS { [...Array(Number(numOwners))].map((x, index) => { @@ -124,7 +134,7 @@ class SafeOwners extends React.Component { { index > 0 && - + } @@ -144,16 +154,17 @@ class SafeOwners extends React.Component { const SafeOwnersForm = withStyles(styles)(SafeOwners) -const SafeOwnersPage = () => (controls: React$Node, moe: Object) => { - const { values, errors } = moe +const SafeOwnersPage = ({ updateInitialProps }: Object) => (controls: React$Node, { values, errors }: Object) => ( + + + + + +) - return ( - - - - - - ) -} export default SafeOwnersPage