+
+ Keinem Club zugeordnet
+
+ Du bist noch keinem Club zugeordnet. Um Koogle zu nutzen, tritt einem bestehenden Club bei.
+
+
+ Einem Club beitreten
+
+
+
+}
else if (_error is not null)
{
@_error
@@ -149,6 +167,7 @@ else if (_dashboard is not null)
@code {
private DashboardDto? _dashboard;
private bool _isLoading = true;
+ private bool _hasNoClub;
private string? _error;
protected override async Task OnInitializedAsync()
@@ -162,6 +181,20 @@ else if (_dashboard is not null)
{
_isLoading = true;
_error = null;
+
+ // Check if user has club context
+ var clubId = CurrentClubContext.ClubId;
+ if (clubId == Guid.Empty)
+ {
+ // Double-check via user service
+ var user = await UserService.GetCurrentUserAsync();
+ if (user == null || user.ClubMemberships.Count == 0)
+ {
+ _hasNoClub = true;
+ return;
+ }
+ }
+
_dashboard = await DashboardService.GetDashboardAsync();
}
catch (Exception ex)