From ec133b65c4d51a23d72d1649e1e5727fe18c20d3 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Sun, 30 Jun 2024 18:29:15 +0800 Subject: [PATCH] chore(console): reorg the display user section in svltekit reorg the display user section in svltekit --- .../assets/docs/guides/web-sveltekit/README.mdx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/console/src/assets/docs/guides/web-sveltekit/README.mdx b/packages/console/src/assets/docs/guides/web-sveltekit/README.mdx index 61344be4081..535f25f2775 100644 --- a/packages/console/src/assets/docs/guides/web-sveltekit/README.mdx +++ b/packages/console/src/assets/docs/guides/web-sveltekit/README.mdx @@ -13,8 +13,7 @@ export const cookieEncryptionKey = generateStandardSecret(); @@ -41,7 +40,7 @@ pnpm add @logto/sveltekit - + Create a `hooks.server.ts` file in your project `src` root if you don't have one. This file is used to define server hooks for your SvelteKit app. @@ -142,6 +141,12 @@ Then use these actions in your Svelte component: + + + + + + To display the user's information, you can inject the `locals.user` object into the layout, thus making it available to all pages: @@ -173,10 +178,4 @@ In your Svelte component: - - - - - -