diff --git a/packages/account/src/Components/poi/idv-status/idv-verified/__tests__/idv-verified.spec.js b/packages/account/src/Components/poi/idv-status/idv-verified/__tests__/idv-verified.spec.tsx similarity index 91% rename from packages/account/src/Components/poi/idv-status/idv-verified/__tests__/idv-verified.spec.js rename to packages/account/src/Components/poi/idv-status/idv-verified/__tests__/idv-verified.spec.tsx index 3dd7e92c5003..fe61dca8ee94 100644 --- a/packages/account/src/Components/poi/idv-status/idv-verified/__tests__/idv-verified.spec.js +++ b/packages/account/src/Components/poi/idv-status/idv-verified/__tests__/idv-verified.spec.tsx @@ -31,15 +31,12 @@ describe('', () => { expect(screen.getByText(submit_text)).toBeInTheDocument(); expect(history.location.pathname).not.toBe('/account/proof-of-address'); fireEvent.click(screen.getByText(submit_text)); - expect(screen.getByRole('link', { name: submit_text }).closest('a')).toHaveAttribute( - 'href', - '/account/proof-of-address' - ); + expect(screen.getByRole('link', { name: submit_text })).toHaveAttribute('href', '/account/proof-of-address'); expect(history.location.pathname).toBe('/account/proof-of-address'); }); it('should render the IdvVerified component when needs_poa is false and is_from_external is true in mobile', () => { - isMobile.mockReturnValue(true); + (isMobile as jest.Mock).mockReturnValue(true); renderWithRouter(); expect(screen.getByTestId('poi_idv_verified_container')).toBeInTheDocument(); expect(screen.getByText(/mockedsvgicon/i)).toBeInTheDocument(); diff --git a/packages/account/src/Components/poi/idv-status/idv-verified/idv-verified.jsx b/packages/account/src/Components/poi/idv-status/idv-verified/idv-verified.tsx similarity index 88% rename from packages/account/src/Components/poi/idv-status/idv-verified/idv-verified.jsx rename to packages/account/src/Components/poi/idv-status/idv-verified/idv-verified.tsx index 3d2ada53fbac..6a29cb45b6d3 100644 --- a/packages/account/src/Components/poi/idv-status/idv-verified/idv-verified.jsx +++ b/packages/account/src/Components/poi/idv-status/idv-verified/idv-verified.tsx @@ -5,7 +5,12 @@ import { localize } from '@deriv/translations'; import PoaButton from 'Components/poa/poa-button'; import IdvDocumentVerified from 'Assets/ic-idv-verified.svg'; -const IdvVerified = ({ needs_poa, is_from_external }) => { +type TIdvVerified = { + needs_poa: boolean; + is_from_external: boolean; +}; + +const IdvVerified = ({ needs_poa, is_from_external }: Partial) => { const header_Text = needs_poa ? localize('Your ID is verified. You will also need to submit proof of your address.') : localize('ID verification passed'); diff --git a/packages/account/src/Components/poi/idv-status/idv-verified/index.js b/packages/account/src/Components/poi/idv-status/idv-verified/index.js index 41a6578c9dfb..d8ec153260d8 100644 --- a/packages/account/src/Components/poi/idv-status/idv-verified/index.js +++ b/packages/account/src/Components/poi/idv-status/idv-verified/index.js @@ -1,3 +1,3 @@ -import IdvVerified from './idv-verified.jsx'; +import IdvVerified from './idv-verified'; export default IdvVerified;