mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 23:40:39 +01:00
fix(useToast)!: don't return a promise on add
This commit is contained in:
@@ -33,7 +33,7 @@ export function useToast() {
|
||||
running.value = false
|
||||
}
|
||||
|
||||
async function add(toast: Partial<Toast>): Promise<Toast> {
|
||||
function add(toast: Partial<Toast>): Toast {
|
||||
const body = {
|
||||
id: generateId(),
|
||||
open: true,
|
||||
@@ -42,7 +42,7 @@ export function useToast() {
|
||||
|
||||
queue.push(body)
|
||||
|
||||
await processQueue()
|
||||
processQueue()
|
||||
|
||||
return body
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user