Files
FrontOffice/src/FrontOffice.Main/Pages/Index.razor.cs

38 lines
2.1 KiB
C#
Raw Normal View History

2025-09-28 07:11:47 +03:30
using FrontOffice.Main.Utilities;
namespace FrontOffice.Main.Pages;
public partial class Index
{
private readonly IReadOnlyList<PackageCard> Packages = new List<PackageCard>
{
new("Starter Combo", "$150", "Entry-level mix of digital services and physical product vouchers.", "https://images.unsplash.com/photo-1581291518857-4e27b48ff24e?auto=format&fit=crop&w=800&q=80"),
new("Growth Portfolio", "$420", "Balanced bundle for network builders with weekly webinars and mentor access.", "https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=800&q=80"),
new("Elite Master Pack", "$980", "Premium assets, lifetime dashboard analytics, and higher binary commissions.", "https://images.unsplash.com/photo-1545239351-1141bd82e8a6?auto=format&fit=crop&w=800&q=80"),
new("Product Booster", "$260", "Merchandise-focused kit with recurring inventory top-ups and customer rewards.", "https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=800&q=80"),
new("Network Accelerator", "$560", "Designed for team leaders<72>includes onboarding funnels and marketing credits.", "https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=800&q=80"),
new("Legacy Plan", "$1,250", "Long-term portfolio with quarterly dividends, event invitations, and VIP support.", "https://images.unsplash.com/photo-1454165205744-3b78555e5572?auto=format&fit=crop&w=800&q=80"),
};
private void NavigateToAuth(bool createAccount)
{
var target = createAccount ? RouteConstants.Auth.Phone : RouteConstants.Auth.Verify;
Navigation.NavigateTo(target);
}
private void HandlePurchase(PackageCard package)
{
Navigation.NavigateTo($"{RouteConstants.Auth.Phone}?redirect=/packages/{Uri.EscapeDataString(package.Title)}");
}
private void HandleDetails(PackageCard package)
{
Navigation.NavigateTo($"/packages/{Uri.EscapeDataString(package.Title)}");
}
private void ScrollToPackages()
{
Navigation.NavigateTo("#packages", forceLoad: false);
}
private sealed record PackageCard(string Title, string Price, string Summary, string ImageUrl);
}