2017-11-19 03:39:02 +09:00
import React from 'react' ;
import ImmutablePropTypes from 'react-immutable-proptypes' ;
import { FormattedMessage } from 'react-intl' ;
import ImmutablePureComponent from 'react-immutable-pure-component' ;
import AvatarOverlay from '../../../components/avatar_overlay' ;
import DisplayName from '../../../components/display_name' ;
2022-11-14 05:10:20 +09:00
import { Link } from 'react-router-dom' ;
2017-11-19 03:39:02 +09:00
export default class MovedNote extends ImmutablePureComponent {
static propTypes = {
from : ImmutablePropTypes . map . isRequired ,
to : ImmutablePropTypes . map . isRequired ,
} ;
render ( ) {
const { from , to } = this . props ;
return (
2022-11-06 05:11:24 +09:00
< div className = 'moved-account-banner' >
< div className = 'moved-account-banner__message' >
< FormattedMessage id = 'account.moved_to' defaultMessage = '{name} has indicated that their new account is now:' values = { { name : < bdi > < strong dangerouslySetInnerHTML = { { _ _html : from . get ( 'display_name_html' ) } } / > < / bdi > } } / >
2017-11-19 03:39:02 +09:00
< / div >
2022-11-06 05:11:24 +09:00
< div className = 'moved-account-banner__action' >
2022-11-14 05:10:20 +09:00
< Link to = { ` /@ ${ to . get ( 'acct' ) } ` } className = 'detailed-status__display-name' >
2022-11-06 05:11:24 +09:00
< div className = 'detailed-status__display-avatar' > < AvatarOverlay account = { to } friend = { from } / > < / div >
< DisplayName account = { to } / >
2022-11-14 05:10:20 +09:00
< / Link >
2022-11-06 05:11:24 +09:00
2022-11-14 05:10:20 +09:00
< Link to = { ` /@ ${ to . get ( 'acct' ) } ` } className = 'button' > < FormattedMessage id = 'account.go_to_profile' defaultMessage = 'Go to profile' / > < / Link >
2022-11-06 05:11:24 +09:00
< / div >
2017-11-19 03:39:02 +09:00
< / div >
) ;
}
}