0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(console): update comments

This commit is contained in:
Gao Sun 2023-07-04 18:31:40 +08:00
parent d2ba119cb6
commit 30f427cb3b
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -13,7 +13,6 @@ const key = 'defaultTenantId';
*
* - By default, the default tenant ID is empty, which means the first tenant is the default tenant.
* - If the default tenant ID is not available to the user anymore, it semantically equals to the first tenant ID.
* - If the user manually navigates to a tenant, the default tenant ID will be set to the target tenant ID.
*/
const useUserDefaultTenantId = () => {
const { data, update: updateMeCustomData } = useMeCustomData();
@ -41,12 +40,7 @@ const useUserDefaultTenantId = () => {
return {
defaultTenantId,
/**
* Update the default tenant ID to the current tenant ID if:
*
* 1. The current tenant ID is not empty.
* 2. The default tenant ID does not equal to the current tenant ID.
*/
/** Update the default tenant ID to the current tenant ID. */
updateIfNeeded,
};
};