mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 22:01:13 +00:00
fix: Fix linting errors
This commit is contained in:
parent
011d2ca1df
commit
c044f06447
1 changed files with 6 additions and 5 deletions
|
@ -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 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue