Prettier Changes
This commit is contained in:
parent
e9c805c36b
commit
1537f8a410
10 changed files with 69 additions and 79 deletions
src/routes/services
|
@ -9,27 +9,26 @@
|
|||
let icons: readonly string[] = $state.frozen([]);
|
||||
|
||||
async function get(url: string): Promise<any> {
|
||||
let res = await fetch(url)
|
||||
let res = await fetch(url);
|
||||
if (res.ok) {
|
||||
let data = await res.json()
|
||||
return data
|
||||
}
|
||||
else {
|
||||
return Promise.reject()
|
||||
let data = await res.json();
|
||||
return data;
|
||||
} else {
|
||||
return Promise.reject();
|
||||
}
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
get("/data/services").then((data: Service[]) => {
|
||||
services = data
|
||||
})
|
||||
})
|
||||
get('/data/services').then((data: Service[]) => {
|
||||
services = data;
|
||||
});
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
get("/assets/icons").then((data: string[]) => {
|
||||
icons = data
|
||||
})
|
||||
})
|
||||
get('/assets/icons').then((data: string[]) => {
|
||||
icons = data;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue