using System.Security.Claims; using Microsoft.AspNetCore.Mvc.RazorPages; namespace Nalu.Web.Pages.En; public class PricingModel : PageModel { public bool IsAuthenticated { get; private set; } public string CurrentPlan { get; private set; } = "free"; public string? CheckoutError { get; private set; } public void OnGet() { IsAuthenticated = User.Identity?.IsAuthenticated ?? false; if (IsAuthenticated) CurrentPlan = User.FindFirstValue("plan") ?? "free"; CheckoutError = TempData["CheckoutError"] as string; } }