From: Dessalines Date: Fri, 23 Sep 2022 04:41:04 +0000 (-0400) Subject: Fix broken profile page, and missing sidebars. (#795) X-Git-Url: http://these/git/readmes/%24%7Bsubmission.url%7D?a=commitdiff_plain;h=32b32aa1643fb94e01da2555b70fa5efc2a8b89d;p=lemmy-ui.git Fix broken profile page, and missing sidebars. (#795) --- diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index b938728..52e7a93 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,