2017-11-18 20:39:02 +02:00
import { FormattedMessage } from 'react-intl' ;
2023-05-23 18:15:17 +03:00
import { Link } from 'react-router-dom' ;
import ImmutablePropTypes from 'react-immutable-proptypes' ;
2017-11-18 20:39:02 +02:00
import ImmutablePureComponent from 'react-immutable-pure-component' ;
2023-05-23 18:15:17 +03:00
2023-05-09 04:11:56 +03:00
import { AvatarOverlay } from '../../../components/avatar_overlay' ;
2023-05-10 00:08:54 +03:00
import { DisplayName } from '../../../components/display_name' ;
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 >
) ;
}
}