example component with atcute xrpc handler passing via props
This commit is contained in:
parent
72f418058f
commit
37e68e86bf
3 changed files with 10 additions and 2 deletions
|
|
@ -1,2 +1,7 @@
|
||||||
<h1>Home Page</h1>
|
<script>
|
||||||
|
import List from "$lib/components/list.svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h1>Home Page</h1>
|
||||||
|
<List did="test" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import List from '$lib/components/list.svelte';
|
||||||
import type { PageProps } from './$types';
|
import type { PageProps } from './$types';
|
||||||
|
|
||||||
let { data }: PageProps = $props();
|
let { data }: PageProps = $props();
|
||||||
|
|
@ -8,5 +9,6 @@
|
||||||
<h1>{data.userData.handle}</h1>
|
<h1>{data.userData.handle}</h1>
|
||||||
<h2>{data.userData.did}</h2>
|
<h2>{data.userData.did}</h2>
|
||||||
|
|
||||||
|
<List did={data.userData.did} rpc={data.rpc}/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ export const load: PageLoad = async ({ parent, params }) => {
|
||||||
userData: {
|
userData: {
|
||||||
handle: params.handle,
|
handle: params.handle,
|
||||||
did: userData.did
|
did: userData.did
|
||||||
}
|
},
|
||||||
|
rpc
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue