Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #PS-2245 fix: Created a new React project for Reset and forgot password #5

Open
wants to merge 1 commit into
base: release-1.0.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/pages/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const ResetPassword: React.FC = () => {
const [token, setToken] = useState<string | null>(null);
const [forgotPassword, setForgotPassword] = useState<boolean>(false);
const [isTokenValid, setIsTokenValid] = useState<boolean>(true);
let urlParams = new URLSearchParams(window.location.search);
let redirectUrl = urlParams.get("redirectUrl") as string;

const getTokenFromQuery = () => {
const params = new URLSearchParams(location.search);
Expand Down Expand Up @@ -61,7 +63,7 @@ const ResetPassword: React.FC = () => {
};

const handlePrimaryButton = () => {
// navigate(`/login`);
window.open(redirectUrl);
};

return (
Expand Down Expand Up @@ -142,9 +144,9 @@ const ResetPassword: React.FC = () => {
fontSize: "14px",
fontWeight: "500",
}}
// onClick={() => {
// navigate("/login");
// }}
onClick={() => {
window.open(redirectUrl);
}}
>
Back to login
</Box>
Expand Down