Fix: User is returned to a previously viewed page after replying to a post
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
17c1f62853
commit
5b46f0c0f7
3 changed files with 6 additions and 2 deletions
|
@ -54,6 +54,10 @@ class ModalRoot extends React.PureComponent {
|
||||||
onCancel: PropTypes.func,
|
onCancel: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static contextTypes = {
|
||||||
|
router: PropTypes.object,
|
||||||
|
};
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
revealed: !!this.props.children,
|
revealed: !!this.props.children,
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ScheduledStatus extends ImmutablePureComponent {
|
||||||
<div className='scheduled-status'>
|
<div className='scheduled-status'>
|
||||||
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id') })} tabIndex={this.props.muted ? null : 0}>
|
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id') })} tabIndex={this.props.muted ? null : 0}>
|
||||||
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted })} data-id={status.get('id')}>
|
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted })} data-id={status.get('id')}>
|
||||||
<div className='status__expand' onClick={this.handleExpandClick} role='presentation' />
|
<div className='status__expand' role='presentation' />
|
||||||
<div className='status__info'>
|
<div className='status__info'>
|
||||||
<NavLink to={statusUrl} className='status__relative-time'>
|
<NavLink to={statusUrl} className='status__relative-time'>
|
||||||
<RelativeTimestamp timestamp={status.get('created_at')} futureDate />
|
<RelativeTimestamp timestamp={status.get('created_at')} futureDate />
|
||||||
|
|
|
@ -63,7 +63,7 @@ class PendingStatus extends ImmutablePureComponent {
|
||||||
<div className={classNames('pending-status', className)}>
|
<div className={classNames('pending-status', className)}>
|
||||||
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id') })} tabIndex={this.props.muted ? null : 0}>
|
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id') })} tabIndex={this.props.muted ? null : 0}>
|
||||||
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted })} data-id={status.get('id')}>
|
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted })} data-id={status.get('id')}>
|
||||||
<div className='status__expand' onClick={this.handleExpandClick} role='presentation' />
|
<div className='status__expand' role='presentation' />
|
||||||
<div className='status__info'>
|
<div className='status__info'>
|
||||||
<span className='status__relative-time'>
|
<span className='status__relative-time'>
|
||||||
<RelativeTimestamp timestamp={status.get('created_at')} />
|
<RelativeTimestamp timestamp={status.get('created_at')} />
|
||||||
|
|
Loading…
Reference in a new issue