auth
This commit is contained in:
parent
ac4c7c0656
commit
fb712bbcab
3 changed files with 20 additions and 13 deletions
|
@ -16,15 +16,9 @@
|
|||
</MapsLayers>
|
||||
</SfMaps>
|
||||
|
||||
@code{
|
||||
public class City
|
||||
{
|
||||
public double Latitude { get; set; }
|
||||
public double Longitude { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
@code {
|
||||
private List<City> Cities = new List<City> {
|
||||
new City { Latitude = 34.060620, Longitude = -118.330491, Name="California" },
|
||||
new City{ Latitude = 40.724546, Longitude = -73.850344, Name="New York"}
|
||||
new City { Latitude = 34.060620, Longitude = -118.330491, Name="California" },
|
||||
new City{ Latitude = 40.724546, Longitude = -73.850344, Name="New York"}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<main>
|
||||
<div class="top-row px-4">
|
||||
@if (!usr.IsAuthorized)
|
||||
@if (u == null)
|
||||
{
|
||||
<a href="/login">Log in</a>
|
||||
<a href="/register">Register</a>
|
||||
|
@ -26,10 +26,10 @@
|
|||
</div>
|
||||
|
||||
@code {
|
||||
private UserModel u;
|
||||
private UserModel u = null!;
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Yield();
|
||||
u = await usr.GetUser()!;
|
||||
u = (await usr.GetUser())!;
|
||||
}
|
||||
}
|
||||
|
|
13
src/Interlinked.Shared/Model/Locations.cs
Normal file
13
src/Interlinked.Shared/Model/Locations.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Interlinked.Shared.Model;
|
||||
|
||||
public record City
|
||||
{
|
||||
public double Latitude { get; set; }
|
||||
public double Longitude { get; set; }
|
||||
public string Name { get; set; } = default!;
|
||||
}
|
Loading…
Reference in a new issue