Skip to content

Commit

Permalink
chore(console): reorg the display user section in svltekit
Browse files Browse the repository at this point in the history
reorg the display user section in svltekit
  • Loading branch information
simeng-li committed Jul 1, 2024
1 parent 08dc2eb commit ec133b6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/console/src/assets/docs/guides/web-sveltekit/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export const cookieEncryptionKey = generateStandardSecret();
<Steps>

<Step
title="Installation"
subtitle="Install Logto SDK"
title="Install Logto SDK"
>
<Tabs>
<TabItem value="npm" label="npm">
Expand All @@ -41,7 +40,7 @@ pnpm add @logto/sveltekit
</Tabs>
</Step>

<Step title="Add Logto hook">
<Step title="Add Logto hook" subtitle="Init Logto client">

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.

Expand Down Expand Up @@ -142,6 +141,12 @@ Then use these actions in your Svelte component:

</Step>

<Step title="Checkpoint" subtitle="Test your app">

<Checkpoint />

</Step>

<Step title="Display user information">

To display the user's information, you can inject the `locals.user` object into the layout, thus making it available to all pages:
Expand Down Expand Up @@ -173,10 +178,4 @@ In your Svelte component:

</Step>

<Step title="Checkpoint: Test your app">

<Checkpoint />

</Step>

</Steps>

0 comments on commit ec133b6

Please sign in to comment.