From 0819dc7b5d98495ad2e7be73f4a439c1987ac54c Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 21 Aug 2021 08:40:32 +0200 Subject: [PATCH] Added comments to fix closes #1 --- src/routes/__layout.svelte | 4 ++++ src/routes/details.svelte | 1 + src/routes/links.svelte | 1 + 3 files changed, 6 insertions(+) diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 4edfec4..8f28293 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -5,6 +5,10 @@ import { onMount } from 'svelte'; import * as localForage from 'localforage'; + /** + * Master init for all things userstore, b/c async stuff somethimes does weired shit. + * Yes i know this isn't the best way to implement this, but linkylinky dashboard is just a oneshot sideproject r/n. + */ onMount(() => { UserStore.init(); localForage.getItem('userdata', (err, value) => { diff --git a/src/routes/details.svelte b/src/routes/details.svelte index f344e61..0a078c7 100644 --- a/src/routes/details.svelte +++ b/src/routes/details.svelte @@ -15,6 +15,7 @@ $: urlVisists = []; let visitQuery; + // Yes i know this isn't the best way to implement this, but linkylinky dashboard is just a oneshot sideproject r/n. const unsubscribe = UserStore.subscribe((value) => { if (value.isLoggedIn) { Apiclient.getUrlDetails(shortcode).then((res) => { diff --git a/src/routes/links.svelte b/src/routes/links.svelte index b54cc75..1b1a87b 100644 --- a/src/routes/links.svelte +++ b/src/routes/links.svelte @@ -6,6 +6,7 @@ $: urls = []; let urlQuery; + // Yes i know this isn't the best way to implement this, but linkylinky dashboard is just a oneshot sideproject r/n. const unsubscribe = UserStore.subscribe((value) => { if (value.isLoggedIn) { urlQuery = Apiclient.getUrls().then((res) => {