Work on login screen
This commit is contained in:
+7
-2
@@ -1,7 +1,9 @@
|
||||
import type {ComponentType} from "svelte"
|
||||
import {randomId} from "@welshman/lib"
|
||||
import {randomId, Emitter} from "@welshman/lib"
|
||||
import {goto} from "$app/navigation"
|
||||
|
||||
export const emitter = new Emitter()
|
||||
|
||||
export const modals = new Map()
|
||||
|
||||
export const pushModal = (component: ComponentType, props: Record<string, any> = {}) => {
|
||||
@@ -14,4 +16,7 @@ export const pushModal = (component: ComponentType, props: Record<string, any> =
|
||||
return id
|
||||
}
|
||||
|
||||
export const clearModal = () => goto('#')
|
||||
export const clearModal = () => {
|
||||
goto('#')
|
||||
emitter.emit('close')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user