Merge pull request #269 from restray/restray_registre_loading
feat(auth): add loading on register button
This commit is contained in:
commit
c47457a17f
@ -19,6 +19,9 @@
|
|||||||
emailEl.focus();
|
emailEl.focus();
|
||||||
});
|
});
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
|
// Prevent double submission
|
||||||
|
if (loading) return;
|
||||||
|
|
||||||
if (password !== passwordCheck) {
|
if (password !== passwordCheck) {
|
||||||
return errorNotification('Passwords do not match.');
|
return errorNotification('Passwords do not match.');
|
||||||
}
|
}
|
||||||
@ -88,8 +91,13 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="flex space-x-2 h-8 items-center justify-center pt-8">
|
<div class="flex space-x-2 h-8 items-center justify-center pt-8">
|
||||||
<button type="submit" class="hover:bg-coollabs-100 text-white bg-coollabs"
|
<button
|
||||||
>Register</button
|
type="submit"
|
||||||
|
class="hover:bg-coollabs-100 text-white"
|
||||||
|
disabled={loading}
|
||||||
|
class:bg-transparent={loading}
|
||||||
|
class:text-stone-600={loading}
|
||||||
|
class:bg-coollabs={!loading}>{loading ? 'Registering...' : 'Register'}</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user