password reset
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
import React, { useState } from 'react'
|
||||
import React, { useState } from 'react';
|
||||
import toast, { Toaster } from 'react-hot-toast';
|
||||
import { Link, useParams } from 'react-router-dom';
|
||||
import { passwordReset } from '../services/PhpApi';
|
||||
import { passwordReset, getPwToken } from '../services/PhpApi';
|
||||
import useSWR from 'swr';
|
||||
import './InputForm.css';
|
||||
|
||||
export default function PasswordReset()
|
||||
@ -14,6 +15,11 @@ export default function PasswordReset()
|
||||
password2:''
|
||||
});
|
||||
|
||||
const { data, error, isLoading } = useSWR({'ptoken': passwordToken}, getPwToken);
|
||||
// data ist dogdata, logindata holt sich getProfilData.php aus $_SESSION
|
||||
if (error) return (<div>failed to load</div>);
|
||||
if (isLoading) return (<div>loading...</div>);
|
||||
|
||||
const onChangeInput = (e: React.FormEvent<HTMLInputElement> ) => {
|
||||
setFormData({
|
||||
...formData,
|
||||
|
||||
Reference in New Issue
Block a user