diff options
Diffstat (limited to 'client/src/data/links.ts')
| -rw-r--r-- | client/src/data/links.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/client/src/data/links.ts b/client/src/data/links.ts deleted file mode 100644 index 3ccf100..0000000 --- a/client/src/data/links.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ShortenRequest } from "$actions/shorten"; -import { Writable, writable } from "svelte/store"; - -function createLinks() { - const { subscribe, update }: Writable<ShortenRequest[]> = writable([]); - - function add(request: ShortenRequest) { - update((l) => [request, ...l.slice(0, 2)]); - } - - return { - subscribe, - add, - }; -} - -export const links = createLinks(); |
