Navmenu related to current authorized user's role

This commit is contained in:
2024-09-12 00:08:22 +03:00
parent 96c70ef0ba
commit 18e02792ec
7 changed files with 50 additions and 15 deletions

View File

@@ -60,7 +60,14 @@
protected override async Task OnInitializedAsync()
{
currentRole = UserDataProvider.GetCurrentRole()!;
try
{
currentRole = UserDataProvider.CurrentRole ?? throw new NotLoggedInException();
}
catch (Exception e)
{
ErrorHandler.Handle(e);
}
await Fetch();
}