Skip to content

Commit

Permalink
refactor: Update SelectAccountIAMRole component to use SelectAccountI…
Browse files Browse the repository at this point in the history
…AMRoleInternal
  • Loading branch information
hervedombya committed Jun 27, 2024
1 parent 1ba391b commit 8ded7cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/react/ui-elements/SelectAccountIAMRole.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,21 @@ export const _SelectAccountIAMRole = (props: SelectAccountIAMRoleProps) => {
}
};

export const SelectAccountIAMRoleInternal = (
props: SelectAccountIAMRoleProps,
) => {
return (
<InternalProvider defaultValue={props.defaultValue}>
<_SelectAccountIAMRole {...props} />
</InternalProvider>
);
};

export default function SelectAccountIAMRole(props: SelectAccountIAMRoleProps) {
return (
<ConfigProvider>
<AuthProvider>
<InternalProvider defaultValue={props.defaultValue}>
<_SelectAccountIAMRole {...props} />
</InternalProvider>
<SelectAccountIAMRoleInternal {...props} />
</AuthProvider>
</ConfigProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { QueryClient, QueryClientProvider } from 'react-query';
import { TEST_API_BASE_URL } from '../../../react/utils/testUtil';
import SelectAccountIAMRole, {
import {
SelectAccountIAMRoleInternal as SelectAccountIAMRole,
extractAccountIdFromARN,
} from '../SelectAccountIAMRole';

Expand Down

0 comments on commit 8ded7cb

Please sign in to comment.