-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[account] [docs] Add custom user details example #4227
Conversation
…into enh/account-3
…into enh/account-3
userDetailsContainer
slotAccountUserDetails
component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ituseSession
docs pageshttps://deploy-preview-4227--mui-toolpad-docs.netlify.app/toolpad/core/react-use-session/