fix quote cant jump post

This commit is contained in:
YoheiZuho 2023-12-31 07:40:51 +00:00
parent 4c2f549331
commit 7183eeb36b
2 changed files with 8 additions and 8 deletions

View File

@ -270,16 +270,16 @@ class Status extends ImmutablePureComponent {
}; };
handleQuoteClick = () => { handleQuoteClick = () => {
if (!this.context.router) { if (!this.props) {
return; return;
} }
const { status } = this.props; const { status } = this.props;
this.context.router.history.push(`/statuses/${status.getIn(['reblog', 'quote', 'id'], status.getIn(['quote', 'id']))}`); this.props.history.push(`/statuses/${status.getIn(['reblog', 'quote', 'id'], status.getIn(['quote', 'id']))}`);
} }
handleQuoteUserClick = () =>{ handleQuoteUserClick = () =>{
if (!this.context.router) { if (!this.props) {
return; return;
} }
@ -708,7 +708,7 @@ class Status extends ImmutablePureComponent {
{media(status)} {media(status)}
{quote(status, this.props.muted, quoteMuted, this.handleQuoteClick, this.handleExpandedQuoteToggle, identity, media, this.context.router, contextType)} {quote(status, this.props.muted, quoteMuted, this.handleQuoteClick, this.handleExpandedQuoteToggle, identity, media, this.props, contextType)}
{expanded && hashtagBar} {expanded && hashtagBar}

View File

@ -82,16 +82,16 @@ class DetailedStatus extends ImmutablePureComponent {
} }
handleQuoteClick = () => { handleQuoteClick = () => {
if (!this.context.router) { if (!this.props) {
return; return;
} }
const { status } = this.props; const { status } = this.props;
this.context.router.history.push(`/statuses/${status.getIn(['quote', 'id'])}`); this.props.history.push(`/statuses/${status.getIn(['quote', 'id'])}`);
} }
handleQuoteUserClick = () =>{ handleQuoteUserClick = () =>{
if (!this.context.router) { if (!this.props) {
return; return;
} }
@ -347,7 +347,7 @@ class DetailedStatus extends ImmutablePureComponent {
{media(status, false)} {media(status, false)}
{quote(status, false, quoteMuted, this.handleQuoteClick, this.handleExpandedQuoteToggle, identity, media, this.context.router)} {quote(status, false, quoteMuted, this.handleQuoteClick, this.handleExpandedQuoteToggle, identity, media, this.props)}
{expanded && hashtagBar} {expanded && hashtagBar}