|
|
@@ -1,10 +1,13 @@
|
|
|
-import React from 'react';
|
|
|
-import PropTypes from 'prop-types';
|
|
|
-import { withTranslation } from 'react-i18next';
|
|
|
+import React, { FC } from 'react';
|
|
|
|
|
|
+import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
-const RedirectedAlert = (props) => {
|
|
|
- const { t } = props;
|
|
|
+type Props = {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+const RedirectedAlert: FC<Props> = () => {
|
|
|
+ const { t } = useTranslation();
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
const fromPath = urlParams.get('redirectFrom');
|
|
|
|
|
|
@@ -15,8 +18,4 @@ const RedirectedAlert = (props) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-RedirectedAlert.propTypes = {
|
|
|
- t: PropTypes.func.isRequired, // i18next
|
|
|
-};
|
|
|
-
|
|
|
-export default withTranslation()(RedirectedAlert);
|
|
|
+export default RedirectedAlert;
|