File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
templates/UmbracoExtension/Client/src/dashboards Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 8
8
import { UmbElementMixin } from "@umbraco-cms/backoffice/element-api" ;
9
9
import { UUIButtonElement } from "@umbraco-cms/backoffice/external/uui" ;
10
10
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" ;
12
12
import { UmbracoExtensionService , UserModel } from "../api/index.js" ;
13
13
14
14
@customElement ( "example-dashboard" )
@@ -23,7 +23,7 @@ export class ExampleDashboardElement extends UmbElementMixin(LitElement) {
23
23
private _serverUserData ?: UserModel ;
24
24
25
25
@state ( )
26
- private _contextCurrentUser ?: typeof UMB_CURRENT_USER_CONTEXT . TYPE ;
26
+ private _contextCurrentUser ?: UmbCurrentUserModel ;
27
27
28
28
#notificationContext?: typeof UMB_NOTIFICATION_CONTEXT . TYPE ;
29
29
@@ -39,7 +39,7 @@ export class ExampleDashboardElement extends UmbElementMixin(LitElement) {
39
39
// We can observe properties from it, such as the current user or perhaps just individual properties
40
40
// When the currentUser object changes we will get notified and can reset the @state properrty
41
41
this . observe (
42
- currentUserContext . currentUser ,
42
+ currentUserContext ? .currentUser ,
43
43
( currentUser ) => {
44
44
this . _contextCurrentUser = currentUser ;
45
45
} ,
You can’t perform that action at this time.
0 commit comments