Delete profile should refresh profiles list
This commit is contained in:
		@ -32,7 +32,7 @@ else
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        _profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
 | 
			
		||||
        await GetProfilesAsync();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task DeleteProfile(int profileId)
 | 
			
		||||
@ -41,7 +41,12 @@ else
 | 
			
		||||
        {
 | 
			
		||||
            await ProfileService.DeleteProfileAsync(profileId);
 | 
			
		||||
            await logger.LogInformation("Profile Deleted {ProfileId}", profileId);
 | 
			
		||||
 | 
			
		||||
            AddModuleMessage(Localizer["Profile Deleted"], MessageType.Success);
 | 
			
		||||
 | 
			
		||||
            await GetProfilesAsync();
 | 
			
		||||
 | 
			
		||||
            StateHasChanged();
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
@ -49,4 +54,7 @@ else
 | 
			
		||||
            AddModuleMessage(Localizer["Error Deleting Profile"], MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task GetProfilesAsync()
 | 
			
		||||
        => _profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user