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-06 05:11:24 +09:00
import Permalink from 'mastodon/components/permalink' ;
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
< / d i v >
2022-11-06 05:11:24 +09:00
< div className = 'moved-account-banner__action' >
< Permalink href = { to . get ( 'url' ) } to = { ` /@ ${ to . get ( 'acct' ) } ` } className = 'detailed-status__display-name' >
< div className = 'detailed-status__display-avatar' > < AvatarOverlay account = { to } friend = { from } / > < / d i v >
< DisplayName account = { to } / >
< / P e r m a l i n k >
< Permalink href = { to . get ( 'url' ) } to = { ` /@ ${ to . get ( 'acct' ) } ` } className = 'button' > < FormattedMessage id = 'account.go_to_profile' defaultMessage = 'Go to profile' / > < / P e r m a l i n k >
< / d i v >
2017-11-19 03:39:02 +09:00
< / d i v >
) ;
}
}