mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 13:09:03 +08:00
17 lines
365 B
Svelte
17 lines
365 B
Svelte
<script>
|
|
import { setContext } from "svelte";
|
|
import UserProfile from "./UserProfile.svelte";
|
|
import createUserContext from "./createUserContext.js";
|
|
|
|
// In a real app, you would fetch the user data from an API
|
|
setContext(
|
|
"user",
|
|
createUserContext({
|
|
username: "john",
|
|
email: "john@example.com",
|
|
})
|
|
);
|
|
</script>
|
|
|
|
<UserProfile />
|