Skip to content

Commit

Permalink
Add UiKit Notification
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jul 23, 2024
1 parent 8fd3899 commit 59d0b6c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/views/PageLogin.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { watch } from 'vue'
import { watch, ref } from 'vue'
import { useRouter } from 'vue-router'
import { ref } from 'vue'
import UIkit from 'uikit'
import type { AlertInterface, LoginForm } from '@userfrosting/sprinkle-account/types'
import { useAuthStore } from '@userfrosting/sprinkle-account/stores'
Expand Down Expand Up @@ -37,6 +37,14 @@ function sendLogin() {
loading.value = true
error.value = null
auth.login(form)
.then((user) => {
UIkit.notification({
message: 'Welcome back ' + user?.full_name + '!',

Check failure on line 42 in src/views/PageLogin.vue

View workflow job for this annotation

GitHub Actions / Vite - Node 18

Property 'full_name' does not exist on type 'never'.

Check failure on line 42 in src/views/PageLogin.vue

View workflow job for this annotation

GitHub Actions / Vite - Node 20

Property 'full_name' does not exist on type 'never'.
status: 'success',
pos: 'bottom-right',
timeout: 4000
})
})
.catch((err) => {
error.value = err
})
Expand Down

0 comments on commit 59d0b6c

Please sign in to comment.