parent
2010cc3260
commit
0819dc7b5d
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue