7 changed files with 34 additions and 3 deletions
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
<script> |
||||
import { onMount } from 'svelte'; |
||||
import { api } from '../../urls.svelte.js'; |
||||
import { t } from '../../translations.svelte.js'; |
||||
|
||||
let error = $state(null); |
||||
|
||||
async function loadTimes(){ |
||||
const url = api('time'); |
||||
const resp = await fetch(url,{credentials:'include'}); |
||||
if (resp.ok){ |
||||
} else { |
||||
error = await resp.text(); |
||||
} |
||||
} |
||||
|
||||
onMount(loadTimes); |
||||
</script> |
||||
|
||||
<h1>{t('timetracking')}</h1> |
||||
{#if error} |
||||
<span class="error">{error}</span> |
||||
{/if} |
||||
Loading…
Reference in new issue