@using Start.Client.Components.Shared @using Start.Client.Store.State @using Start.Client.Store.Features.CreateGroup @using Fluxor @inherits Fluxor.Blazor.Web.Components.FluxorComponent @inject IDispatcher dispatch @inject IState state
@if (this.state.Value.CurrentContainerState.ErrorMessage != null) { @this.state.Value.CurrentContainerState.ErrorMessage } @if (this.state.Value.CurrentContainerState.IsLoadingCurrentContainer) {

Loading Bookmarks

} else if (this.state.Value.CurrentContainerState.Container == null) {

Failed To Load Container

} else if (this.state.Value.CurrentContainerState.Container.BookmarkGroups == null || (!(this.state.Value.CurrentContainerState.Container.BookmarkGroups?.Any()) ?? true)) {

No Bookmark Groups

} else {
@* The compiler doesn't pick up that null has already been checked for, so the ! is needed *@ @foreach (BookmarkGroupDto group in this.state.Value.CurrentContainerState.Container.BookmarkGroups!) { } @if (this.state.Value.EditMode) {
}
}
@code { public void ShowCreateGroupForm() { if (this.state.Value.CurrentContainerState.Container == null) return; dispatch.Dispatch(new ShowCreateGroupFormAction( this.state.Value.CurrentContainerState.Container.BookmarkContainerId, this.state.Value.CurrentContainerState.Container.Title)); } }