Added comments to fix

closes #1
This commit is contained in:
Nicolai Ort 2021-08-21 08:40:32 +02:00
parent 2010cc3260
commit 0819dc7b5d
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
3 changed files with 6 additions and 0 deletions

View File

@ -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) => {

View File

@ -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) => {

View File

@ -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) => {