This commit is contained in:
femsci 2023-10-01 11:11:42 +02:00
parent ac4c7c0656
commit fb712bbcab
Signed by: femsci
GPG key ID: 08F7911F0E650C67
3 changed files with 20 additions and 13 deletions

View file

@ -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"}
};
}
}

View file

@ -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())!;
}
}

View 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!;
}