aminghadersohi commented on code in PR #37973:
URL: https://github.com/apache/superset/pull/37973#discussion_r2930382798
##########
superset-frontend/src/pages/UserInfo/index.tsx:
##########
@@ -159,7 +164,10 @@ export function UserInfo({ user }: { user:
UserWithPermissionsAndRoles }) {
<StyledLayout>
<StyledHeader>{t('Your user information')}</StyledHeader>
<DescriptionsContainer>
- <Collapse defaultActiveKey={['userInfo', 'personalInfo']} ghost>
+ <Collapse
+ defaultActiveKey={['userInfo', 'personalInfo', 'apiKeys']}
+ ghost
+ >
Review Comment:
The useApiKeyContext hook is called unconditionally at the top of the
component. The conditional logic is only around the UI rendering
(showing/hiding the API key section), not the hook call itself. This follows
React rules of hooks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]