[account] [docs] Add custom user details example#4227
[account] [docs] Add custom user details example#4227bharatkashyap merged 69 commits intomui:masterfrom
Conversation
…into enh/account-3
…into enh/account-3
userDetailsContainer slotAccountUserDetails component
apedroferreira
left a comment
There was a problem hiding this comment.
Looks great, really easy to understand!
Added some small documentation suggestions.
| const session = useSession(); | ||
| ``` | ||
|
|
||
| If your session has additional data which you want to display in the account popover, you an create custom components for user information display with the session object: |
There was a problem hiding this comment.
| If your session has additional data which you want to display in the account popover, you an create custom components for user information display with the session object: | |
| If your session has additional data which you want to display in the account popover, you can create custom components for user information display with the session object: |
| } | ||
| ``` | ||
|
|
||
| The following example demonstrates this behaviour clearly: |
There was a problem hiding this comment.
| The following example demonstrates this behaviour clearly: | |
| The following example demonstrates this behavior: |
"behavior" for American english as I guess that's the one we use?
| The `session` can be created using any authentication provider of your choice. You can access the current value of the `SessionContext` inside Toolpad Core components by invoking the hook: | ||
|
|
||
| ```js | ||
| const session = useSession(); |
There was a problem hiding this comment.
Should we show where to import it from here too?
|
I believe that |
I'll update the original issue you created with this and we can track this as a feature request to be discussed and potentially added (or not) to the roadmap - let me know if that's okay |
<Account/>#4226To Do
useSession()hook for user to be able to extend ituseSessiondocs pageshttps://deploy-preview-4227--mui-toolpad-docs.netlify.app/toolpad/core/react-use-session/