Fixing yes/no dialog. Fix AppDelegate for navigation

This commit is contained in:
John Lyon-Smith
2018-03-06 13:56:04 -08:00
parent 58c894b63d
commit 69e3057e10
10 changed files with 208 additions and 7 deletions

View File

@@ -98,7 +98,7 @@ export class App extends Component {
<ProtectedRoute path='/teams' component={Users} />
<ProtectedRoute path='/system' component={Users} />
<ProtectedRoute path='/logout' component={Logout} />
<ProtectedRoute path='/' component={Home} />
<ProtectedRoute path='/' render={props => (<Home {...props} onChangeTitle={this.handleChangeTitle} />)} />
</Switch>
<Column.Item>
<Box background={colorInfo.headerButtonBackground} borderTop={{ width: sizeInfo.headerBorderWidth, color: colorInfo.headerBorder }}>

View File

@@ -4,7 +4,16 @@ import { Row, Column, PanelButton } from 'ui'
export class Home extends Component {
static propTypes = {
history: PropTypes.object
history: PropTypes.object,
onChangeTitle: PropTypes.func.isRequired,
}
componentDidMount() {
this.props.onChangeTitle('Home')
}
componentDidUnmount() {
this.props.onChangeTitle('')
}
render() {

View File

@@ -52,7 +52,7 @@ export class YesNoMessageModal extends React.Component {
</Row.Item>
<Row.Item width={10} />
<Row.Item>
<Button submit='messageModal' text='No' onClick={(e) => this.onSubmit(e, true)} />
<Button submit='messageModal' text='No' onClick={(e) => this.onSubmit(e, false)} />
</Row.Item>
<Row.Item grow />
</Row>

View File

@@ -45,6 +45,10 @@ export class Users extends Component {
})
}
componentDidUnmount() {
this.props.onChangeTitle('')
}
removeUnfinishedNewUser() {
let users = this.state.users