namespace GameAtlas.Views.Composants;

using GameAtlas.Models;

public partial class BoutonVoir : ContentView
{
	public BoutonVoir()
	{
		InitializeComponent();
	}

    private async void OnVoirClicked(object sender, EventArgs e)
    {
        var selectedjeu = (sender as Button)?.BindingContext as Jeu;
        if (selectedjeu != null)
        {
            //await Shell.Current.GoToAsync(nameof(PageJeu(selectedjeu));      ---- Ne marche pas ----
            await Navigation.PushAsync(new PageJeu(selectedjeu));
        }
    }
}