svelte-migrate: updated files
This commit is contained in:
parent
4d6149760d
commit
ff5a2eef65
36 changed files with 1252 additions and 1384 deletions
5
ui/src/routes/categories/[cid]/+page.js
Normal file
5
ui/src/routes/categories/[cid]/+page.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export async function load({ params }) {
|
||||
return {
|
||||
cid: params.cid,
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +1,3 @@
|
|||
<script context="module">
|
||||
import { getWork } from '$lib/works';
|
||||
|
||||
export async function load({ params }) {
|
||||
return {
|
||||
props: {
|
||||
cid: params.cid,
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
|
|
@ -17,12 +5,10 @@
|
|||
import CategoryAdmin from '$lib/components/CategoryAdmin.svelte';
|
||||
import { Category, getCategory } from '$lib/categories';
|
||||
|
||||
export let cid;
|
||||
export let data;
|
||||
|
||||
let categoryP = null;
|
||||
$: {
|
||||
categoryP = getCategory(cid);
|
||||
}
|
||||
$: categoryP = getCategory(data.cid);
|
||||
</script>
|
||||
|
||||
{#await categoryP then category}
|
||||
|
|
|
|||
Reference in a new issue