<commit_before>@using System
@using System.Threading.Tasks
@using Claimini.BlazorClient.ApplicationState
@using Claimini.Shared
@page "/articles/add"
@inherits Claimini.BlazorClient.Components.BaseComponent
@inject IApiClient apiClient;
@inject Microsoft.AspNetCore.Blazor.Services.IUriHelper UriHelper

<h1>Add Customer</h1>
<ArticleForm OnSubmit=AddArticle />

@functions
{

private async Task<Article> AddArticle(Article article)
{
    Article resultArticle = await apiClient.PostArticle(article);
    ActionCreators.SelectArticle(Store.Dispatch, resultArticle.Id);
    UriHelper.NavigateTo($"/articles/detail/{resultArticle.Id}");
    return resultArticle;
}

}<commit_msg>Adding added item to the state<commit_after>@using System
@using System.Threading.Tasks
@using Claimini.BlazorClient.ApplicationState
@using Claimini.Shared
@page "/articles/add"
@inherits Claimini.BlazorClient.Components.BaseComponent
@inject IApiClient apiClient;
@inject Microsoft.AspNetCore.Blazor.Services.IUriHelper UriHelper

<h1>Add Customer</h1>
<ArticleForm OnSubmit=AddArticle />

@functions
{

private async Task<Article> AddArticle(Article article)
{
    Article resultArticle = await apiClient.PostArticle(article);
    State.Articles.Add(resultArticle);
    ActionCreators.SelectArticle(Store.Dispatch, resultArticle.Id);
    UriHelper.NavigateTo($"/articles/detail/{resultArticle.Id}");
    return resultArticle;
}

}
{'fraction_non_alphanumeric': 0.10567375886524823, 'fraction_numerical': 0.0028368794326241137, 'mean_word_length': 6.545454545454546, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2554216', 'n_tokens_mistral': 446, 'n_tokens_neox': 418, 'n_words': 80}