Implement movie fetching

This commit is contained in:
2026-01-19 18:46:55 +01:00
parent 1cce273057
commit 5a561f9fff
4 changed files with 61 additions and 5 deletions

View File

@@ -1,7 +1,24 @@
@page "/favorites"
@rendermode InteractiveServer
<PageTitle>Favorites</PageTitle>
<h1>TODO</h1>
<button class="btn btn-primary" @onclick="FaiCose">FaiCose</button>
@inject OmdbService OmdbService
@inject IJSRuntime JSRuntime
@code {
private async Task FaiCose()
{
await JSRuntime.InvokeVoidAsync("console.log", "Cose fatte!");
var movies = await OmdbService.FetchMovies("Matrix");
var movieDetail = await OmdbService.FetchMovieDetail("tt28228084");
await JSRuntime.InvokeVoidAsync("console.log", movies);
await JSRuntime.InvokeVoidAsync("console.log", movieDetail);
}
}