@using Start.Client.Components.Shared @using Start.Client.Store.Features.CreateBookmark @using Fluxor @inherits Fluxor.Blazor.Web.Components.FluxorComponent @inject IActionSubscriber actionSubscriber @inject IDispatcher dispatch @inject IState state
Create Bookmark
@if (this.state.Value.CreateBookmarkErrorMessage != null) { @this.state.Value.CreateBookmarkErrorMessage }
@if (this.state.Value.IsLoadingCreateBookmark) { } else { }
@code { protected BookmarkDto Model { get; set; } = new BookmarkDto("", "", null, 0); protected override void OnInitialized() { base.OnInitialized(); this.Model = new BookmarkDto("", "", null, this.state.Value.GroupId); actionSubscriber.SubscribeToAction(this, a => this.Model.BookmarkGroupId = a.GroupId); } protected void OnSubmit() { dispatch.Dispatch(new SubmitCreateBookmarkAction(this.Model)); } protected void OnDialogClose() { dispatch.Dispatch(new HideCreateBookmarkFormAction()); } }