Reactions page improvements

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2021-09-10 00:23:49 +02:00
parent d60f187c98
commit fc8bb22359
2 changed files with 3 additions and 5 deletions

View File

@@ -16,10 +16,8 @@ export default class ColumnBackButton extends React.PureComponent {
handleClick = () => {
const { to } = this.props;
if (to) {
this.context.router.history.push(to);
} else if (window.history && window.history.length === 1) {
this.context.router.history.push('/');
if (window.history && window.history.length === 1) {
this.context.router.history.push(to ? to : '/');
} else {
this.context.router.history.goBack();
}