replace alerts with notifications using DaisyUI toasts

This commit is contained in:
Michael Dausmann
2023-05-12 23:46:27 +10:00
parent c6b48f05c1
commit 0d2db65f74
7 changed files with 76 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
const supabase = useSupabaseAuthClient();
const config = useRuntimeConfig();
const notifyStore = useNotifyStore();
const loading = ref(false)
const email = ref('')
@@ -12,9 +13,9 @@
redirectTo: `${config.public.siteRootUrl}/resetpassword`,
})
if (error) throw error
else alert('Password Reset link sent, check your email.');
else notifyStore.notify("Password Reset link sent, check your email.", NotificationType.Success);
} catch (error) {
alert(error)
notifyStore.notify(error, NotificationType.Error);
} finally {
loading.value = false
}