login service by localstorg
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
@page "/Register"
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@inject HttpClient _hc
|
||||
@inject NavigationManager nav
|
||||
@inject UserAuthenticationDTO userinfo
|
||||
@inject localService localserv;
|
||||
<PageTitle>ثبت نام</PageTitle>
|
||||
<main>
|
||||
|
||||
@@ -89,11 +90,13 @@
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (userinfo!=null)
|
||||
nav.NavigateTo("/");
|
||||
|
||||
|
||||
editContext = new EditContext(model);
|
||||
messageStore = new(editContext);
|
||||
|
||||
if (await localserv.OnlineUser())
|
||||
nav.NavigateTo("/");
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user