import { useState } from "react"; import { navigate } from "gatsby"; import AuthLayout from "../../layouts/AuthLayout"; import { ResetPasswordForm } from "../../components/forms/ResetPasswordForm"; import HighlightedLink from "../../components/HighlightedLink"; const State = { Pure: "PURE", Success: "SUCCESS", Failure: "FAILURE", }; const RecoverPage = ({ location }) => { const query = new URLSearchParams(location.search); const token = query.get("token"); const [state, setState] = useState(State.Pure); return (
Skynet
{state !== State.Success && ( { setState(State.Success); navigate("/"); }} onFailure={() => setState(State.Failure)} /> )} {state === State.Success && (

All done! You will be redirected to your dashboard shortly.

)} {state === State.Failure && (

Something went wrong, please try again later.

)}

Suddenly remembered your old password? Sign in

); }; RecoverPage.Layout = AuthLayout; export default RecoverPage;