public async Task <IViewComponentResult> InvokeAsync() { var model = await _commonViewModelService.PrepareAdminHeaderLinks(_workContext.CurrentCustomer); if (!model.DisplayAdminLink && !model.IsCustomerImpersonated) { return(Content("")); } return(View(model)); }
public IViewComponentResult Invoke() { var model = _commonViewModelService.PrepareAdminHeaderLinks(_workContext.CurrentCustomer); if (!model.DisplayAdminLink) { return(Content("")); } return(View(model)); }