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