diff --git a/src/components/PageLayout/LoginFormWrapper/LoginFormWrapper.tsx b/src/components/PageLayout/LoginFormWrapper/LoginFormWrapper.tsx index f2381dfe..da858fde 100644 --- a/src/components/PageLayout/LoginFormWrapper/LoginFormWrapper.tsx +++ b/src/components/PageLayout/LoginFormWrapper/LoginFormWrapper.tsx @@ -1,3 +1,4 @@ +import {useRouter} from 'next/router' import {FC, useState} from 'react' import {Button} from '@/components/Clickable/Clickable' @@ -10,6 +11,7 @@ export interface ILoginFormWrapper { } export const LoginFormWrapper: FC = ({closeOverlay}) => { + const router = useRouter() const [form, changeForm] = useState('login') if (form === 'login') @@ -26,5 +28,11 @@ export const LoginFormWrapper: FC = ({closeOverlay}) => { ) - return + return ( + { + router.push('/reset-verification-sent') + }} + /> + ) } diff --git a/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx b/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx index 9b211cdd..129bbcde 100644 --- a/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx +++ b/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx @@ -27,6 +27,12 @@ export const PasswordResetRequestForm: FC = ({closeOverlay}) mutationFn: (data: PasswordResetRequestFormValues) => { return axios.post('/api/user/password/reset/', data) }, + + onError: (error, variables, context) => {}, + + onSuccess: () => { + closeOverlay() + }, }) const onSubmit: SubmitHandler = (data) => { diff --git a/src/pages/malynar/reset-verification-sent/index.tsx b/src/pages/malynar/reset-verification-sent/index.tsx new file mode 100644 index 00000000..5ffc20cb --- /dev/null +++ b/src/pages/malynar/reset-verification-sent/index.tsx @@ -0,0 +1,15 @@ +import {NextPage} from 'next' + +import {Verification} from '@/components/Verification/Verification' + +import {PageLayout} from '../../../components/PageLayout/PageLayout' + +const PasswordResetRequest: NextPage = () => { + return ( + + + + ) +} + +export default PasswordResetRequest diff --git a/src/pages/matik/reset-verification-sent/index.tsx b/src/pages/matik/reset-verification-sent/index.tsx new file mode 100644 index 00000000..5ffc20cb --- /dev/null +++ b/src/pages/matik/reset-verification-sent/index.tsx @@ -0,0 +1,15 @@ +import {NextPage} from 'next' + +import {Verification} from '@/components/Verification/Verification' + +import {PageLayout} from '../../../components/PageLayout/PageLayout' + +const PasswordResetRequest: NextPage = () => { + return ( + + + + ) +} + +export default PasswordResetRequest diff --git a/src/pages/strom/reset-verification-sent/index.tsx b/src/pages/strom/reset-verification-sent/index.tsx new file mode 100644 index 00000000..5ffc20cb --- /dev/null +++ b/src/pages/strom/reset-verification-sent/index.tsx @@ -0,0 +1,15 @@ +import {NextPage} from 'next' + +import {Verification} from '@/components/Verification/Verification' + +import {PageLayout} from '../../../components/PageLayout/PageLayout' + +const PasswordResetRequest: NextPage = () => { + return ( + + + + ) +} + +export default PasswordResetRequest