diff --git a/website/Pages/EventRegister.razor b/website/Pages/EventRegister.razor index 2a0db67..6151ea6 100644 --- a/website/Pages/EventRegister.razor +++ b/website/Pages/EventRegister.razor @@ -106,7 +106,7 @@ @@ -152,6 +152,10 @@ private string _errorMessage = string.Empty; private readonly RestClient _restClient = RestServiceClient.Create(); + private const string hintEmailRequired = "E-Mail for prizes"; + private const string hintEmailNotRequired = "E-Mail for prizes (optional)"; + private string hintEmail = hintEmailNotRequired; + protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) @@ -186,6 +190,9 @@ var events = await _restClient.GetJsonAsync>(eventsUrlWithQuery); _event = events.FirstOrDefault(); + + if (_event != null && _event.EmailRequired) + hintEmail = hintEmailRequired; } private async Task CreatePlayer()