Skip to content

Commit d86064e

Browse files
RockerbyiOvergaard
authored andcommitted
Update references to Umbraco User model (Extension Template) (#19349)
Update references to Umbraco User model In the template dashboard, update the type reference for the umbraco user
1 parent 08400b6 commit d86064e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/UmbracoExtension/Client/src/dashboards/dashboard.element.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { UmbElementMixin } from "@umbraco-cms/backoffice/element-api";
99
import { UUIButtonElement } from "@umbraco-cms/backoffice/external/uui";
1010
import { UMB_NOTIFICATION_CONTEXT } from "@umbraco-cms/backoffice/notification";
11-
import { UMB_CURRENT_USER_CONTEXT } from "@umbraco-cms/backoffice/current-user";
11+
import { UMB_CURRENT_USER_CONTEXT, UmbCurrentUserModel } from "@umbraco-cms/backoffice/current-user";
1212
import { UmbracoExtensionService, UserModel } from "../api/index.js";
1313

1414
@customElement("example-dashboard")
@@ -23,7 +23,7 @@ export class ExampleDashboardElement extends UmbElementMixin(LitElement) {
2323
private _serverUserData?: UserModel;
2424

2525
@state()
26-
private _contextCurrentUser?: typeof UMB_CURRENT_USER_CONTEXT.TYPE;
26+
private _contextCurrentUser?: UmbCurrentUserModel;
2727

2828
#notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE;
2929

@@ -39,7 +39,7 @@ export class ExampleDashboardElement extends UmbElementMixin(LitElement) {
3939
// We can observe properties from it, such as the current user or perhaps just individual properties
4040
// When the currentUser object changes we will get notified and can reset the @state properrty
4141
this.observe(
42-
currentUserContext.currentUser,
42+
currentUserContext?.currentUser,
4343
(currentUser) => {
4444
this._contextCurrentUser = currentUser;
4545
},

0 commit comments

Comments
 (0)