()
| 404 | }); |
| 405 | |
| 406 | export function OrgApiKeysSection() { |
| 407 | // Gate BEFORE mounting the body: `orgApiKeysAtom` starts its fetch when the |
| 408 | // reading component mounts, and for a plain member that request is a |
| 409 | // guaranteed 403. Fail-closed like the admin nav — while the member list is |
| 410 | // loading, show nothing rather than a section that will refuse. |
| 411 | const isAdmin = useIsTenantAdmin(); |
| 412 | return isAdmin ? <OrgApiKeysSectionBody /> : null; |
| 413 | } |
| 414 | |
| 415 | function OrgApiKeysSectionBody() { |
| 416 | const result = useAtomValue(orgApiKeysAtom); |
nothing calls this directly
no test coverage detected