2017-11-18 20:39:02 +02: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-13 22:10:20 +02:00
import { Link } from 'react-router-dom' ;
2017-11-18 20:39:02 +02: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-05 22:11:24 +02: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-18 20:39:02 +02:00
< / div >
2022-11-05 22:11:24 +02:00
< div className = 'moved-account-banner__action' >
2022-11-13 22:10:20 +02:00
< Link to = { ` /@ ${ to . get ( 'acct' ) } ` } className = 'detailed-status__display-name' >
2022-11-05 22:11:24 +02:00
< div className = 'detailed-status__display-avatar' > < AvatarOverlay account = { to } friend = { from } / > < / div >
< DisplayName account = { to } / >
2022-11-13 22:10:20 +02:00
< / Link >
2022-11-05 22:11:24 +02:00
2022-11-13 22:10:20 +02:00
< Link to = { ` /@ ${ to . get ( 'acct' ) } ` } className = 'button' > < FormattedMessage id = 'account.go_to_profile' defaultMessage = 'Go to profile' / > < / Link >
2022-11-05 22:11:24 +02:00
< / div >
2017-11-18 20:39:02 +02:00
< / div >
) ;
}
}