Add new onboarding flow to web UI (#24619)

This commit is contained in:
Eugen Rochko
2023-04-23 22:24:53 +02:00
committed by GitHub
parent 9d75b03ba4
commit 0461f83320
23 changed files with 1019 additions and 357 deletions

View File

@@ -12,13 +12,19 @@ export default class ColumnBackButton extends React.PureComponent {
static propTypes = {
multiColumn: PropTypes.bool,
onClick: PropTypes.func,
};
handleClick = () => {
if (window.history && window.history.state) {
this.context.router.history.goBack();
const { router } = this.context;
const { onClick } = this.props;
if (onClick) {
onClick();
} else if (window.history && window.history.state) {
router.history.goBack();
} else {
this.context.router.history.push('/');
router.history.push('/');
}
};