import { useState } from 'react' import Button from '@material-ui/core/Button' import TextField from '@material-ui/core/TextField' import Typography from '@material-ui/core/Typography' import Container from '@material-ui/core/Container' import EmptyLayout from '../Layout/EmptyLayout' import { resetPassword } from '../../../redux/auth/service' interface Props { resetPassword: typeof resetPassword, token: string } const ResetPassword = (props: Props) => { const { resetPassword, token } = props const initialState = { password: '' } const [state, setState] = useState(initialState) const handleInput = (e: any) => { e.preventDefault() setState({ ...state, [e.target.name]: e.target.value }) } const handleReset = (e: any) => { e.preventDefault() resetPassword(token, state.password) } return (
Reset Password Please enter your password for your email address
handleReset(e)}> handleInput(e)} />
) } export default ResetPassword