mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
refactor: refactoring du FRONT page subscribe
This commit is contained in:
@ -9,7 +9,7 @@ import InputTextIcon from '@/components/InputTextIcon';
|
||||
import Loader from '@/components/Loader'; // Importez le composant Loader
|
||||
import Button from '@/components/Button'; // Importez le composant Button
|
||||
import Popup from '@/components/Popup';
|
||||
import { BK_RESET_PASSWORD_URL, FR_USERS_LOGIN_URL } from '@/utils/Url';
|
||||
import { BE_AUTH_RESET_PASSWORD_URL, FE_USERS_LOGIN_URL } from '@/utils/Url';
|
||||
import { KeySquare } from 'lucide-react'; // Importez directement les icônes nécessaires
|
||||
import useCsrfToken from '@/hooks/useCsrfToken';
|
||||
|
||||
@ -34,7 +34,7 @@ export default function Page() {
|
||||
setIsLoading(false);
|
||||
}, 1000);
|
||||
} else {
|
||||
const url= `${BK_RESET_PASSWORD_URL}/${uuid}`;
|
||||
const url= `${BE_AUTH_RESET_PASSWORD_URL}/${uuid}`;
|
||||
fetch(url, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@ -66,11 +66,11 @@ export default function Page() {
|
||||
}, 1000);
|
||||
} else {
|
||||
const request = new Request(
|
||||
`${BK_RESET_PASSWORD_URL}/${uuid}`,
|
||||
`${BE_AUTH_RESET_PASSWORD_URL}/${uuid}`,
|
||||
{
|
||||
method:'POST',
|
||||
headers: {
|
||||
'Content-Type':'application/json',
|
||||
'Content-Type':'application/json',
|
||||
'X-CSRFToken': csrfToken
|
||||
},
|
||||
credentials: 'include',
|
||||
@ -116,7 +116,7 @@ export default function Page() {
|
||||
message={popupMessage}
|
||||
onConfirm={() => {
|
||||
setPopupVisible(false);
|
||||
router.push(`${FR_USERS_LOGIN_URL}`);
|
||||
router.push(`${FE_USERS_LOGIN_URL}`);
|
||||
}}
|
||||
onCancel={() => setPopupVisible(false)}
|
||||
/>
|
||||
@ -136,7 +136,7 @@ export default function Page() {
|
||||
</form>
|
||||
<br/>
|
||||
<div className="flex justify-center mt-2 max-w-md mx-auto">
|
||||
<Button text="Annuler" className="w-full" href={`${FR_USERS_LOGIN_URL}`} />
|
||||
<Button text="Annuler" className="w-full" href={`${FE_USERS_LOGIN_URL}`} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user