mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added back action to action list
no issue - Adds back action to action list to allow pages to navigate back to last page
This commit is contained in:
parent
ec407eae5f
commit
7dd4282520
1 changed files with 7 additions and 0 deletions
|
@ -110,6 +110,12 @@ export default class ParentContainer extends React.Component {
|
|||
this.setState({
|
||||
showPopup: !this.state.showPopup
|
||||
});
|
||||
} else if (action === 'back') {
|
||||
if (this.state.lastPage) {
|
||||
this.setState({
|
||||
page: this.state.lastPage
|
||||
});
|
||||
}
|
||||
} else if (action === 'closePopup') {
|
||||
const {page: defaultPage} = this.getDefaultPage();
|
||||
this.setState({
|
||||
|
@ -187,6 +193,7 @@ export default class ParentContainer extends React.Component {
|
|||
action: this.state.action,
|
||||
brandColor: this.getBrandColor(),
|
||||
page: this.state.page,
|
||||
lastPage: this.state.lastPage,
|
||||
onAction: (action, data) => this.onAction(action, data)
|
||||
}}>
|
||||
{this.renderPopup()}
|
||||
|
|
Loading…
Add table
Reference in a new issue