diff --git a/components/login-forms/package.json b/components/login-forms/package.json index 57f2efe30b..f1734e4ac9 100644 --- a/components/login-forms/package.json +++ b/components/login-forms/package.json @@ -39,8 +39,7 @@ "@dhis2/ui-constants": "8.13.6", "@dhis2/ui-forms": "^8.13.14", "classnames": "^2.3.1", - "prop-types": "^15.7.2", - "react-router-dom": "^6.12.1" + "prop-types": "^15.7.2" }, "files": [ "build" diff --git a/components/login-forms/src/components/account-creation-form.js b/components/login-forms/src/components/account-creation-form.js index 163d7fc2b9..0f463dbc9a 100644 --- a/components/login-forms/src/components/account-creation-form.js +++ b/components/login-forms/src/components/account-creation-form.js @@ -14,13 +14,13 @@ import { } from '@dhis2/ui-forms' import PropTypes from 'prop-types' import React, { useEffect } from 'react' -import { Link, useInRouterContext } from 'react-router-dom' import { getIsRequired, removeHTMLTags } from '../helpers/index.js' // import { useLoginSettings } from '../providers/use-login-settings.js' import { BackToLoginButton } from './back-to-login-button.js' // import "../styles.css"; import { FormNotice } from './form-notice.js' import { FormSubtitle } from './form-subtitle.js' +import { Link } from './link.js' export const CREATE_FORM_TYPES = { create: 'create', @@ -67,7 +67,6 @@ const InnerCreateAccountForm = ({ prepopulatedFields, }) => { const isRequired = getIsRequired(uiLocale) - const inRouterContext = useInRouterContext() return ( <> @@ -172,13 +171,11 @@ const InnerCreateAccountForm = ({ ? i18n.t('Creating...', { lng: uiLocale }) : i18n.t('Create account', { lng: uiLocale })} - {inRouterContext && ( - - - - )} + + +