kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
add unfollow icon in ActionButton
rodzic
6bff6037d6
commit
3a620ca26a
|
@ -1,5 +1,6 @@
|
||||||
import banIcon from '@tabler/icons/outline/ban.svg';
|
import banIcon from '@tabler/icons/outline/ban.svg';
|
||||||
import plusIcon from '@tabler/icons/outline/plus.svg';
|
import plusIcon from '@tabler/icons/outline/plus.svg';
|
||||||
|
import xIcon from '@tabler/icons/outline/x.svg';
|
||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -223,13 +224,11 @@ const ActionButton: React.FC<IActionButton> = ({ account, actionType, small }) =
|
||||||
);
|
);
|
||||||
} else if (!account.relationship?.blocking && !account.relationship?.muting) {
|
} else if (!account.relationship?.blocking && !account.relationship?.muting) {
|
||||||
// Follow & Unfollow
|
// Follow & Unfollow
|
||||||
|
let icon = plusIcon;
|
||||||
let icon: string | undefined;
|
if (blockedBy) {
|
||||||
|
|
||||||
if (isFollowing) {
|
|
||||||
icon = plusIcon;
|
|
||||||
} else if (blockedBy) {
|
|
||||||
icon = banIcon;
|
icon = banIcon;
|
||||||
|
} else if (isFollowing) {
|
||||||
|
icon = xIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Ładowanie…
Reference in New Issue