fix: Fix linting errors

This commit is contained in:
SleeplessOne1917 2023-09-27 17:13:02 -04:00
parent 011d2ca1df
commit c044f06447

View file

@ -156,10 +156,11 @@ const Follows = () =>
getCommunitiesListing("subscribed", UserService.Instance.myUserInfo?.follows);
const isPersonBlocked = (personRes: RequestState<GetPersonDetailsResponse>) =>
personRes.state === "success" &&
(personRes.state === "success" &&
UserService.Instance.myUserInfo?.person_blocks.some(
({ target: { id } }) => id === personRes.data.person_view.person.id,
);
)) ??
false;
export class Profile extends Component<
RouteComponentProps<{ username: string }>,
@ -787,7 +788,7 @@ export class Profile extends Component<
});
if (res.state === "success") {
updatePersonBlock(res.data);
this.setState({ personBlocked: isPersonBlocked(res) });
this.setState({ personBlocked: res.data.blocked });
}
}