@page "/movie/{id}" Movie Details
@if (movie is not null) {

@movie.Title

@movie.Title Poster

@movie.Runtime

@movie.Plot

@if(ManageFavorite.IsFavorite(id)) { } else { }
} else {

Loading movie details...

}
@inject OmdbService OmdbService @inject ManageFavorite ManageFavorite @code { [Parameter] public required string id { get; set; } private Movie? movie; protected override async Task OnInitializedAsync() { movie = await OmdbService.FetchMovieDetail(id); await ManageFavorite.LoadFavorites(); } private async Task ToggleFavoriteMovie() { await ManageFavorite.ToggleFavoriteMovie(id); } }