File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 450450 {
451451 var result = await ProtectedSessionStore.GetAsync<int>("count");
452452 CurrentCount = result.Success ? result.Value : 0;
453- isConnected = true;
453+ isLoaded = true;
454454 }
455455
456456 public async Task IncrementCount()
469469@using Microsoft.AspNetCore.ProtectedBrowserStorage
470470@inject ProtectedSessionStorage ProtectedSessionStore
471471
472- @if (isConnected )
472+ @if (isLoaded )
473473{
474474 <CascadingValue Value="this">
475475 @ChildContent
481481}
482482
483483@code {
484- private bool isConnected ;
484+ private bool isLoaded ;
485485
486486 [Parameter]
487487 public RenderFragment ChildContent { get; set; }
492492 {
493493 if (firstRender)
494494 {
495- isConnected = true;
495+ isLoaded = true;
496496 await LoadStateAsync();
497497 StateHasChanged();
498498 }
501501 private async Task LoadStateAsync()
502502 {
503503 CurrentCount = await ProtectedSessionStore.GetAsync<int>("count");
504- isConnected = true;
504+ isLoaded = true;
505505 }
506506
507507 public async Task IncrementCount()
You can’t perform that action at this time.
0 commit comments