Merge branch 'oakes/own-account-familiar-followers' into 'develop'

Don't show familiar followers for own account

See merge request soapbox-pub/soapbox!2575
This commit is contained in:
Alex Gleason 2023-06-27 20:38:49 +00:00
commit 14ad6e6fb2

View file

@ -7,7 +7,7 @@ import { usePatronUser } from 'soapbox/api/hooks';
import Badge from 'soapbox/components/badge'; import Badge from 'soapbox/components/badge';
import Markup from 'soapbox/components/markup'; import Markup from 'soapbox/components/markup';
import { Icon, HStack, Stack, Text } from 'soapbox/components/ui'; import { Icon, HStack, Stack, Text } from 'soapbox/components/ui';
import { useSoapboxConfig } from 'soapbox/hooks'; import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
import { isLocal } from 'soapbox/utils/accounts'; import { isLocal } from 'soapbox/utils/accounts';
import { badgeToTag, getBadges as getAccountBadges } from 'soapbox/utils/badges'; import { badgeToTag, getBadges as getAccountBadges } from 'soapbox/utils/badges';
import { capitalize } from 'soapbox/utils/strings'; import { capitalize } from 'soapbox/utils/strings';
@ -46,6 +46,8 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
const intl = useIntl(); const intl = useIntl();
const { displayFqn } = useSoapboxConfig(); const { displayFqn } = useSoapboxConfig();
const { patronUser } = usePatronUser(account?.url); const { patronUser } = usePatronUser(account?.url);
const me = useAppSelector(state => state.me);
const ownAccount = account?.id === me;
const getStaffBadge = (): React.ReactNode => { const getStaffBadge = (): React.ReactNode => {
if (account?.admin) { if (account?.admin) {
@ -228,7 +230,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
{renderBirthday()} {renderBirthday()}
</div> </div>
<ProfileFamiliarFollowers account={account} /> {ownAccount ? null : <ProfileFamiliarFollowers account={account} />}
</Stack> </Stack>
{account.fields.length > 0 && ( {account.fields.length > 0 && (