diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index b9387284..52e7a93b 100644 --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@ -129,8 +129,6 @@ export class Profile extends Component { } else { this.fetchUserData(); } - - this.setPersonBlock(); } fetchUserData() { @@ -209,6 +207,7 @@ export class Profile extends Component { } componentDidMount() { + this.setPersonBlock(); setupTippy(); } @@ -413,9 +412,12 @@ export class Profile extends Component {
- {pv.person.display_name && ( -
{pv.person.display_name}
- )} + {pv.person.display_name.match({ + some: displayName => ( +
{displayName}
+ ), + none: <>, + })}
  • { }); } - // TODO test this, make sure its good moderates() { return this.state.personRes .map(r => r.moderates) .match({ some: moderates => { if (moderates.length > 0) { -
    -
    -
    {i18n.t("moderates")}
    -
      - {moderates.map(cmv => ( -
    • - -
    • - ))} -
    + return ( +
    +
    +
    {i18n.t("moderates")}
    +
      + {moderates.map(cmv => ( +
    • + +
    • + ))} +
    +
    -
    ; + ); + } else { + return <>; } }, none: void 0, @@ -693,18 +698,22 @@ export class Profile extends Component { .match({ some: follows => { if (follows.length > 0) { -
    -
    -
    {i18n.t("subscribed")}
    -
      - {follows.map(cfv => ( -
    • - -
    • - ))} -
    + return ( +
    +
    +
    {i18n.t("subscribed")}
    +
      + {follows.map(cfv => ( +
    • + +
    • + ))} +
    +
    -
    ; + ); + } else { + return <>; } }, none: void 0,