User Account delete is now a button

This commit is contained in:
Sarah Faey 2022-12-08 21:08:41 +01:00
parent 5c868d45c6
commit ed1a03cb24

View file

@ -72,13 +72,8 @@
<br /> <br />
<button type="submit">Save</button> <button type="submit">Save</button>
<ValidationSummary /> <ValidationSummary />
<br/>
<br/>
<br/>
<br/>
<br/>
<a href="Account/Logout" class="loginText" @onclick="() => DeleteAccountClicked()">Delete Account</a>
</EditForm> </EditForm>
<button type="delete" @onclick="() => DeleteAccountClicked()">Delete Account</button>
</Authorized> </Authorized>
</AuthorizeView> </AuthorizeView>
@ -112,6 +107,7 @@
bool confirmed = await JsRuntime.InvokeAsync<bool>("confirm", "Are you sure you want to delete this Website Account?\nThis will sign you off in every raid in which you are signed up."); bool confirmed = await JsRuntime.InvokeAsync<bool>("confirm", "Are you sure you want to delete this Website Account?\nThis will sign you off in every raid in which you are signed up.");
if (confirmed) if (confirmed)
{ {
NavigationManager.NavigateTo("Account/Logout", true);
await UserService.DeleteUser(_user.Id); await UserService.DeleteUser(_user.Id);
} }
} }