Initial commit - Auth.RCL
This commit is contained in:
Executable
+38
@@ -0,0 +1,38 @@
|
||||
@page "/resend"
|
||||
@inject UserAPIConsumer userAPIConsumer
|
||||
@layout EmptyLayout
|
||||
|
||||
<div class="container px-5 py-24 mx-auto flex flex-wrap items-center">
|
||||
|
||||
<div class="lg:w-2/6 md:w-1/2 bg-gray-100 rounded-lg p-8 flex flex-col w-full mt-10 md:mt-0">
|
||||
<h2 class="text-gray-900 text-lg font-medium title-font mb-5">Verify your Email</h2>
|
||||
|
||||
<p>Didn't recieve an email? press the resend email button</p>
|
||||
|
||||
|
||||
<button @onclick="ResendEmail" type="button"
|
||||
class="text-white mt-4 bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg">Resend
|
||||
Email</button>
|
||||
<p class='text-md font-bold @(isSuccessful ? "text-green-500" : "text-red-500") mt-4'>@resultMessage</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
string resultMessage = "";
|
||||
bool isSuccessful = false;
|
||||
|
||||
async Task ResendEmail()
|
||||
{
|
||||
resultMessage = "";
|
||||
isSuccessful = await userAPIConsumer.ResendConfirmation();
|
||||
if (isSuccessful)
|
||||
resultMessage = "Email Sent.";
|
||||
else
|
||||
resultMessage = "Error.";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user