/* eslint-disable @typescript-eslint/no-misused-promises */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { toast } from 'react-toastify' import { MapOverlayPage } from '#components/Templates/MapOverlayPage' import { useAuth } from './useAuth' export function SetNewPasswordPage() { const [password, setPassword] = useState('') const { passwordReset, loading } = useAuth() const navigate = useNavigate() const onReset = async () => { const token = window.location.search.split('token=')[1] console.log(token) await toast.promise(passwordReset(token, password), { success: { render() { navigate('/') return 'New password set' }, }, error: { render({ data }) { return `${data}` }, }, pending: 'setting password ...', }) } return (

Set new Password

setPassword(e.target.value)} className='tw-input tw-input-bordered tw-w-full tw-max-w-xs' />
) }