diff --git a/web/src/elements/sidebar/SidebarUser.ts b/web/src/elements/sidebar/SidebarUser.ts index 487c675f6..983b5f23b 100644 --- a/web/src/elements/sidebar/SidebarUser.ts +++ b/web/src/elements/sidebar/SidebarUser.ts @@ -6,6 +6,7 @@ import fa from "@fortawesome/fontawesome-free/css/all.css"; // @ts-ignore import AvatarStyle from "@patternfly/patternfly/components/Avatar/avatar.css"; import { User } from "../../api/user"; +import { until } from "lit-html/directives/until"; @customElement("pb-sidebar-user") export class SidebarUser extends LitElement { @@ -41,12 +42,13 @@ export class SidebarUser extends LitElement { ]; } - async render(): Promise { - const user = await User.me(); + render(): TemplateResult { return html` - - ${user.username} + ${until(User.me().then(u => { + return html` + ${u.username}`; + }), html``)}