| @@ -5,6 +5,10 @@ | |||||||
| 	import { onMount } from 'svelte'; | 	import { onMount } from 'svelte'; | ||||||
| 	import * as localForage from 'localforage'; | 	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(() => { | 	onMount(() => { | ||||||
| 		UserStore.init(); | 		UserStore.init(); | ||||||
| 		localForage.getItem('userdata', (err, value) => { | 		localForage.getItem('userdata', (err, value) => { | ||||||
|   | |||||||
| @@ -15,6 +15,7 @@ | |||||||
| 	$: urlVisists = []; | 	$: urlVisists = []; | ||||||
| 	let visitQuery; | 	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) => { | 	const unsubscribe = UserStore.subscribe((value) => { | ||||||
| 		if (value.isLoggedIn) { | 		if (value.isLoggedIn) { | ||||||
| 			Apiclient.getUrlDetails(shortcode).then((res) => { | 			Apiclient.getUrlDetails(shortcode).then((res) => { | ||||||
|   | |||||||
| @@ -6,6 +6,7 @@ | |||||||
| 	$: urls = []; | 	$: urls = []; | ||||||
| 	let urlQuery; | 	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) => { | 	const unsubscribe = UserStore.subscribe((value) => { | ||||||
| 		if (value.isLoggedIn) { | 		if (value.isLoggedIn) { | ||||||
| 			urlQuery = Apiclient.getUrls().then((res) => { | 			urlQuery = Apiclient.getUrls().then((res) => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user