Added first working stats to the dashboard
This commit is contained in:
		@@ -1,10 +1,19 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
						import Apiclient from '$lib/Apiclient';
 | 
				
			||||||
	import Statscard from '$lib/Statscard.svelte';
 | 
						import Statscard from '$lib/Statscard.svelte';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						$: stats = {
 | 
				
			||||||
 | 
							urls: 0,
 | 
				
			||||||
 | 
							visits: 99
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						Apiclient.getStats().then((res) => {
 | 
				
			||||||
 | 
							stats = res;
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h2 class="text-3xl font-bold text-gray-800 dark:text-gray-100 pb-6">Home</h2>
 | 
					<h2 class="text-3xl font-bold text-gray-800 dark:text-gray-100 pb-6">Home</h2>
 | 
				
			||||||
<div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
 | 
					<div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
 | 
				
			||||||
	<Statscard title="Links created">
 | 
						<Statscard title="Links created" bind:count={stats.urls}>
 | 
				
			||||||
		<svg
 | 
							<svg
 | 
				
			||||||
			xmlns="http://www.w3.org/2000/svg"
 | 
								xmlns="http://www.w3.org/2000/svg"
 | 
				
			||||||
			class="h-6 w-6"
 | 
								class="h-6 w-6"
 | 
				
			||||||
@@ -20,7 +29,7 @@
 | 
				
			|||||||
			/>
 | 
								/>
 | 
				
			||||||
		</svg>
 | 
							</svg>
 | 
				
			||||||
	</Statscard>
 | 
						</Statscard>
 | 
				
			||||||
	<Statscard title="Visits">
 | 
						<Statscard title="Visits" bind:count={stats.visits}>
 | 
				
			||||||
		<svg
 | 
							<svg
 | 
				
			||||||
			xmlns="http://www.w3.org/2000/svg"
 | 
								xmlns="http://www.w3.org/2000/svg"
 | 
				
			||||||
			class="h-6 w-6"
 | 
								class="h-6 w-6"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user