preparing contact index page

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-06 23:14:39 +02:00
parent f5ea613991
commit bf7de3cb6c
14 changed files with 135 additions and 23 deletions

View File

@@ -0,0 +1,24 @@
<script>
import { onMount } from 'svelte';
import { api } from '../../urls.svelte';
import { error, yikes } from '../../warn.svelte';
import { t } from '../../translations.svelte';
let contacts = $state({})
async function load(){
const url = api('contact/list');
const res = await fetch(url,{credentials:'include'});
if (res.ok){
yikes();
var data = await res.json();
console.log(data);
} else {
error(res);
}
}
onMount(load);
</script>
<h1>{t('contacts')}</h1>