refactor(web): remove typescript
This commit is contained in:
@@ -3,24 +3,20 @@ import { useMutation } from '@apollo/client';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import LoadingButton from '@mui/lab/LoadingButton';
|
||||
|
||||
import { FORGOT_PASSWORD } from 'graphql/mutations/forgot-password.ee';
|
||||
import Form from 'components/Form';
|
||||
import TextField from 'components/TextField';
|
||||
import useFormatMessage from 'hooks/useFormatMessage';
|
||||
|
||||
export default function ForgotPasswordForm() {
|
||||
const formatMessage = useFormatMessage();
|
||||
const [forgotPassword, { data, loading }] = useMutation(FORGOT_PASSWORD);
|
||||
|
||||
const handleSubmit = async (values: any) => {
|
||||
const handleSubmit = async (values) => {
|
||||
await forgotPassword({
|
||||
variables: {
|
||||
input: values,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Paper sx={{ px: 2, py: 4 }}>
|
||||
<Typography
|
||||
@@ -59,9 +55,14 @@ export default function ForgotPasswordForm() {
|
||||
{formatMessage('forgotPasswordForm.submit')}
|
||||
</LoadingButton>
|
||||
|
||||
{data && <Typography variant="body1" sx={{ color: (theme) => theme.palette.success.main }}>
|
||||
{formatMessage('forgotPasswordForm.instructionsSent')}
|
||||
</Typography>}
|
||||
{data && (
|
||||
<Typography
|
||||
variant="body1"
|
||||
sx={{ color: (theme) => theme.palette.success.main }}
|
||||
>
|
||||
{formatMessage('forgotPasswordForm.instructionsSent')}
|
||||
</Typography>
|
||||
)}
|
||||
</Form>
|
||||
</Paper>
|
||||
);
|
Reference in New Issue
Block a user