REFACTOR: Implement full page reloads for state-critical navigation

This commit is contained in:
Chris-1010
2025-02-22 13:00:20 +00:00
parent aa1b85513f
commit 12d9f3660a
9 changed files with 35 additions and 42 deletions

View File

@@ -1,16 +1,18 @@
import React from "react";
import PasswordResetForm from "../components/Auth/PasswordResetForm";
import { useParams, useNavigate } from "react-router-dom";
import { useParams } from "react-router-dom";
const ResetPasswordPage: React.FC = () => {
const { token } = useParams<{ token: string }>();
const navigate = useNavigate();
const handlePasswordReset = (success: boolean) => {
if (success) {
alert("Password reset successful!");
navigate("/");
}
window.location.href = "/";
}
else {
alert("Password reset failed.");
}
};
if (!token) {