2018-03-29 07:43:20 -05:00
import { FormattedMessage } from 'react-intl' ;
2023-05-28 09:38:10 -05:00
import ImmutablePropTypes from 'react-immutable-proptypes' ;
2018-03-29 07:43:20 -05:00
import ImmutablePureComponent from 'react-immutable-pure-component' ;
2023-05-28 09:38:10 -05:00
2023-12-09 11:33:42 -06:00
import { AvatarOverlay } from '../../../components/avatar_overlay' ;
2023-05-09 16:08:54 -05:00
import { DisplayName } from '../../../components/display_name' ;
2024-02-20 16:06:17 -06:00
import { Permalink } from '../../../components/permalink' ;
2018-03-29 07:43:20 -05:00
2024-02-20 16:06:17 -06:00
export default class MovedNote extends ImmutablePureComponent {
2018-03-29 07:43:20 -05:00
static propTypes = {
from : ImmutablePropTypes . map . isRequired ,
to : ImmutablePropTypes . map . isRequired ,
2023-02-03 13:52:07 -06:00
} ;
2018-03-29 07:43:20 -05:00
render ( ) {
const { from , to } = this . props ;
return (
2024-02-20 16:06:17 -06: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 > } } / >
2018-03-29 07:43:20 -05:00
< / div >
2024-02-20 16:06:17 -06:00
< div className = 'moved-account-banner__action' >
< Permalink to = { ` /@ ${ to . get ( 'acct' ) } ` } href = { to . get ( 'url' ) } className = 'detailed-status__display-name' >
< div className = 'detailed-status__display-avatar' > < AvatarOverlay account = { to } friend = { from } / > < / div >
< DisplayName account = { to } / >
< / Permalink >
< Permalink to = { ` /@ ${ to . get ( 'acct' ) } ` } href = { to . get ( 'url' ) } className = 'button' > < FormattedMessage id = 'account.go_to_profile' defaultMessage = 'Go to profile' / > < / Permalink >
< / div >
2018-03-29 07:43:20 -05:00
< / div >
) ;
}
}