Add back follow relationship badge on redesigned profiles (#3413)
This commit is contained in:
parent
bfbe73f127
commit
76ce42bef3
@ -122,7 +122,7 @@ export const AccountHeader: React.FC<{
|
|||||||
isRedesign && redesignClasses.header,
|
isRedesign && redesignClasses.header,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{me !== account.id && relationship && !isRedesign && (
|
{me !== account.id && relationship && (
|
||||||
<AccountInfo relationship={relationship} />
|
<AccountInfo relationship={relationship} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@ -4,9 +4,13 @@ import { FormattedMessage } from 'react-intl';
|
|||||||
|
|
||||||
import type { Relationship } from '@/flavours/glitch/models/relationship';
|
import type { Relationship } from '@/flavours/glitch/models/relationship';
|
||||||
|
|
||||||
|
import { isRedesignEnabled } from '../common';
|
||||||
|
|
||||||
export const AccountInfo: FC<{ relationship?: Relationship }> = ({
|
export const AccountInfo: FC<{ relationship?: Relationship }> = ({
|
||||||
relationship,
|
relationship,
|
||||||
}) => {
|
}) => {
|
||||||
|
const isRedesign = isRedesignEnabled();
|
||||||
|
|
||||||
if (!relationship) {
|
if (!relationship) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -17,17 +21,17 @@ export const AccountInfo: FC<{ relationship?: Relationship }> = ({
|
|||||||
<AccountInfoFollower relationship={relationship} />
|
<AccountInfoFollower relationship={relationship} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{relationship.blocking && (
|
{!isRedesign && relationship.blocking && (
|
||||||
<span className='relationship-tag'>
|
<span className='relationship-tag'>
|
||||||
<FormattedMessage id='account.blocking' defaultMessage='Blocking' />
|
<FormattedMessage id='account.blocking' defaultMessage='Blocking' />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{relationship.muting && (
|
{!isRedesign && relationship.muting && (
|
||||||
<span key='muting' className='relationship-tag'>
|
<span key='muting' className='relationship-tag'>
|
||||||
<FormattedMessage id='account.muting' defaultMessage='Muting' />
|
<FormattedMessage id='account.muting' defaultMessage='Muting' />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{relationship.domain_blocking && (
|
{!isRedesign && relationship.domain_blocking && (
|
||||||
<span key='domain_blocking' className='relationship-tag'>
|
<span key='domain_blocking' className='relationship-tag'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.domain_blocking'
|
id='account.domain_blocking'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user