self destroying notifications, working on validating login form
This commit is contained in:
@@ -15,13 +15,15 @@ export const useNotifications = defineStore('notifications', {
|
||||
},
|
||||
|
||||
add(type : string, text: string) : void {
|
||||
const id = uuidv4()
|
||||
this.notifications.set(
|
||||
uuidv4(),
|
||||
id,
|
||||
{
|
||||
type:type,
|
||||
text:text,
|
||||
}
|
||||
)
|
||||
setTimeout(() => this.remove(id), 1500)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user