Added details to details page (duh!)
This commit is contained in:
parent
4338ee2a98
commit
10bccefe77
|
@ -1,12 +1,28 @@
|
|||
<script>
|
||||
import { page } from '$app/stores';
|
||||
import Apiclient from '$lib/Apiclient';
|
||||
|
||||
let shortcode = $page.query.get('shortcode');
|
||||
$: urlDetails = {};
|
||||
$: urlVisists = [];
|
||||
|
||||
Apiclient.getUrlDetails(shortcode).then((res)=>{
|
||||
urlDetails=res;
|
||||
});
|
||||
Apiclient.getUrlVisits(shortcode).then((res)=>{
|
||||
urlVisists=res;
|
||||
});
|
||||
</script>
|
||||
|
||||
<h2 class="text-3xl font-bold text-gray-800 dark:text-gray-100 pb-6">Details: {shortcode}</h2>
|
||||
|
||||
<div class="text-gray-800 dark:text-gray-100">
|
||||
<span><h2>Shortcode:</h2></span>
|
||||
<span><h2>URL:</h2></span>
|
||||
<span><h2>Target:</h2></span>
|
||||
<h2>Shortcode:</h2>
|
||||
{urlDetails.shortcode}
|
||||
<h2>URL:</h2>
|
||||
{urlDetails.url}
|
||||
<h2>Target:</h2>
|
||||
{urlDetails.target}
|
||||
<h2>Visits:</h2>
|
||||
{urlDetails.visits}
|
||||
</div>
|
Loading…
Reference in New Issue