6db83ccd90
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 4m55s
- Discount store pages (products, cart, orders, order detail) - Blog pages and services - Payment gateway callback page - AppImage component, EmptyState, LoadingState, PageHeader - DiscountCartService, DiscountOrderService, DiscountProductService - BlogCategoryService, BlogPostService, SitePageService, ImageCacheService - PhoneVerifyForm component - Profile Hub page - UI/UX improvements across all pages - landing.js for homepage - Config and routing updates
35 lines
824 B
C#
35 lines
824 B
C#
using CMSMicroservice.Protobuf.Protos.User;
|
|
using FrontOffice.Main.Utilities;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace FrontOffice.Main.Pages.Profile;
|
|
|
|
public partial class Hub
|
|
{
|
|
[Inject] private UserContract.UserContractClient UserContract { get; set; } = default!;
|
|
|
|
private GetUserResponse _userProfile = new();
|
|
|
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
{
|
|
await base.OnAfterRenderAsync(firstRender);
|
|
if (firstRender)
|
|
{
|
|
await LoadUserProfile();
|
|
}
|
|
}
|
|
|
|
private async Task LoadUserProfile()
|
|
{
|
|
try
|
|
{
|
|
_userProfile = await UserContract.GetUserAsync(request: new());
|
|
}
|
|
catch
|
|
{
|
|
_userProfile = new GetUserResponse();
|
|
}
|
|
StateHasChanged();
|
|
}
|
|
}
|