+ @if (this.state.Value.CurrentContainerState.ErrorMessage != null)
+ {
+
+ @this.state.Value.CurrentContainerState.ErrorMessage
+
+ }
+
+ @if (this.state.Value.CurrentContainerState.IsLoadingCurrentContainer)
{
@@ -7,27 +23,60 @@
Loading Bookmarks
-
Loading Bookmarks
}
- else if (!this.Container.BookmarkGroups?.Any() ?? true)
+ 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
+
+
+ Create Group
+
+
}
else
{
- foreach (BookmarkGroupDto group in this.Container.BookmarkGroups!)
- {
-
- }
+
+ @* 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!)
+ {
+
+ }
+
+
+
+
+
+
+
}
@code {
- [Parameter]
- public BookmarkContainerDto? Container { get; set; }
+ 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));
+ }
}
diff --git a/Start/Client/Components/BookmarkGroup.razor b/Start/Client/Components/BookmarkGroup.razor
index 64a7381..a644691 100644
--- a/Start/Client/Components/BookmarkGroup.razor
+++ b/Start/Client/Components/BookmarkGroup.razor
@@ -1,24 +1,47 @@
-