change var name

This commit is contained in:
mahanstreamer 2021-10-08 20:33:17 -04:00 committed by GitHub
parent f254433f87
commit c5796bc7aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ interface ProfileState {
sort: SortType; sort: SortType;
page: number; page: number;
loading: boolean; loading: boolean;
personBlocks: boolean; personBlocked: boolean;
siteRes: GetSiteResponse; siteRes: GetSiteResponse;
} }
@ -87,7 +87,7 @@ export class Profile extends Component<any, ProfileState> {
view: Profile.getViewFromProps(this.props.match.view), view: Profile.getViewFromProps(this.props.match.view),
sort: Profile.getSortTypeFromProps(this.props.match.sort), sort: Profile.getSortTypeFromProps(this.props.match.sort),
page: Profile.getPageFromProps(this.props.match.page), page: Profile.getPageFromProps(this.props.match.page),
personBlocks: false, personBlocked: false,
siteRes: this.isoData.site_res, siteRes: this.isoData.site_res,
}; };
@ -131,9 +131,9 @@ export class Profile extends Component<any, ProfileState> {
); );
} }
get isBlocked() { get isBlocked() {
this.state.personBlocks = UserService.Instance.myUserInfo.person_blocks. this.state.personBlocked = UserService.Instance.myUserInfo.person_blocks.
map(a => a.target.id).includes(this.state.personRes.person_view.person.id) map(a => a.target.id).includes(this.state.personRes.person_view.person.id)
return this.state.personBlocks return this.state.personBlocked
} }
static getViewFromProps(view: string): PersonDetailsView { static getViewFromProps(view: string): PersonDetailsView {