auth
This commit is contained in:
parent
ac4c7c0656
commit
fb712bbcab
3 changed files with 20 additions and 13 deletions
|
@ -16,15 +16,9 @@
|
||||||
</MapsLayers>
|
</MapsLayers>
|
||||||
</SfMaps>
|
</SfMaps>
|
||||||
|
|
||||||
@code{
|
@code {
|
||||||
public class City
|
|
||||||
{
|
|
||||||
public double Latitude { get; set; }
|
|
||||||
public double Longitude { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
}
|
|
||||||
private List<City> Cities = new List<City> {
|
private List<City> Cities = new List<City> {
|
||||||
new City { Latitude = 34.060620, Longitude = -118.330491, Name="California" },
|
new City { Latitude = 34.060620, Longitude = -118.330491, Name="California" },
|
||||||
new City{ Latitude = 40.724546, Longitude = -73.850344, Name="New York"}
|
new City{ Latitude = 40.724546, Longitude = -73.850344, Name="New York"}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
@if (!usr.IsAuthorized)
|
@if (u == null)
|
||||||
{
|
{
|
||||||
<a href="/login">Log in</a>
|
<a href="/login">Log in</a>
|
||||||
<a href="/register">Register</a>
|
<a href="/register">Register</a>
|
||||||
|
@ -26,10 +26,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private UserModel u;
|
private UserModel u = null!;
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
await Task.Yield();
|
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