diff --git a/src/pages/Profile/index.js b/src/pages/Profile/index.js
new file mode 100644
index 0000000..3cfa151
--- /dev/null
+++ b/src/pages/Profile/index.js
@@ -0,0 +1,53 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { __, sprintf } from '@wordpress/i18n';
+import { useNavigate, useParams } from 'react-router-dom';
+import { is } from 'ramda';
+
+// store
+import { storeSet, useStore } from '../../store';
+
+// components
+import { Messages } from 'primereact/messages';
+import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
+
+const Profile = () => {
+ const isAsyncRequest = useStore().main.isAsyncRequest();
+ const { id } = useParams();
+ const [data, setData] = useState({});
+ const infoMsgs = useRef(null);
+
+ const getCallback = (data) => {
+ if (data.status === 'SUCCESS') {
+ //setData(getFormattedBandiData(data.data));
+ }
+ storeSet.main.unsetAsyncRequest();
+ }
+
+ const errGetCallback = (data) => {
+ set404FromErrorResponse(data);
+ storeSet.main.unsetAsyncRequest();
+ }
+
+ useEffect(() => {
+ //BandoService.getBando(bandoId, getCallback, errGetCallback);
+ }, [id]);
+
+ return (
+
+
+
{data.name}
+
+ {__('Profilo utente', 'gepafin')}
+
+
+
+
+
+
+
+
+ )
+
+}
+
+export default Profile;
\ No newline at end of file
diff --git a/src/pages/Registration/index.js b/src/pages/Registration/index.js
index db5968f..bee30c4 100644
--- a/src/pages/Registration/index.js
+++ b/src/pages/Registration/index.js
@@ -3,6 +3,7 @@ import { __, sprintf } from '@wordpress/i18n';
import { useForm } from 'react-hook-form';
import { classNames } from 'primereact/utils';
import { isEmpty } from 'ramda';
+import { useParams } from 'react-router-dom';
// api
import AuthenticationService from '../../service/authentication-service';
@@ -23,6 +24,7 @@ const Registration = () => {
const token = useStore().main.token();
const [loading, setLoading] = useState(false);
const errorMsgs = useRef(null);
+ let { temp_token } = useParams();
const {
control,
handleSubmit,
@@ -73,6 +75,10 @@ const Registration = () => {
}
}, [token]);
+ useEffect(() => {
+ console.log('temp_token', temp_token)
+ }, [temp_token]);
+
return (
diff --git a/src/routes.js b/src/routes.js
index 583bbc4..4812fcf 100644
--- a/src/routes.js
+++ b/src/routes.js
@@ -20,6 +20,7 @@ import BandoApplication from './pages/BandoApplication';
import Registration from './pages/Registration';
import BandiBeneficiario from './pages/BandiBeneficiario';
import LoginAdmin from './pages/LoginAdmin';
+import Profile from './pages/Profile';
const routes = ({ role }) => {
return (
@@ -69,6 +70,10 @@ const routes = ({ role }) => {
{'ROLE_SUPER_ADMIN' === role ?
: null}
{'ROLE_BENEFICIARY' === role ?
: null}
}/>
+
+ {'ROLE_SUPER_ADMIN' === role ? : null}
+ {'ROLE_BENEFICIARY' === role ? : null}
+ }/>
}/>
}/>