@page "/" @inject WeatherService WeatherService Memphis Weather @if (weather == null) { } else { @weather.City Weather Current Conditions @weather.Temperature.ToString("F1")°F @weather.Description Humidity: @weather.Humidity% Wind: @weather.WindSpeed mph More Details View Weather History Developer Resources View PlayWright test report for this website. View Report } @code { private WeatherInfo? weather; protected override async Task OnInitializedAsync() { await RefreshWeather(); } private async Task RefreshWeather() { weather = await WeatherService.GetWeatherAsync(); } }