diff --git a/src/components/ModalRoot.svelte b/src/components/ModalRoot.svelte deleted file mode 100644 index 86bad7f..0000000 --- a/src/components/ModalRoot.svelte +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/src/lib/util/modal/index.ts b/src/lib/util/modal/index.ts deleted file mode 100644 index 25b941c..0000000 --- a/src/lib/util/modal/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { v4 } from "uuid"; - -export interface Modal { - title: string; - message: string; -} - -export class ModalManager { - private static listeners: { - id: string; - callback: (data: Modal) => void; - }[] = []; - - static addListener(callback: (data: Modal) => void) { - const id = v4(); - this.listeners.push({ id, callback }); - return id; - } - - static removeListener(id: string) { - this.listeners = this.listeners.filter((listener) => listener.id !== id); - } - - static notify(data: Modal) { - this.listeners.forEach((listener) => listener.callback(data)); - } -} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9e73fa7..abef142 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -4,7 +4,6 @@ import Logo from "../components/LogoWithTextHorizontal.svelte"; import { CodeBranchOutline, DiscordSolid, DownloadOutline } from "flowbite-svelte-icons"; import { browser } from "$app/environment"; - import ModalManager from "$components/ModalRoot.svelte"; import { writable } from "svelte/store"; import { setContext } from "svelte"; import type { PageData } from "./$types"; @@ -52,11 +51,11 @@
- - diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 97f9b4c..9ff9166 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,8 +1,9 @@ @@ -69,25 +67,24 @@ and open-source, forever.

- - - - + >("token");