24 lines
626 B
C#
24 lines
626 B
C#
using GameIdeas.BlazorApp.Pages.Games.Gateways;
|
|
using GameIdeas.Shared.Dto;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace GameIdeas.BlazorApp.Pages.Detail;
|
|
|
|
public partial class GameDetail
|
|
{
|
|
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
|
[Parameter] public int GameId { get; set; }
|
|
|
|
private GameDetailDto Game = new();
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
Game = await GameGateway.GetGameById(GameId);
|
|
await base.OnInitializedAsync();
|
|
}
|
|
|
|
private void HandleSubmitNewGame()
|
|
{
|
|
NavigationManager.NavigateTo("/");
|
|
}
|
|
} |