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

@ -17,12 +17,6 @@
</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"}

View file

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

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