feat(ott-2272): add redirect on login page after registration

keep-around/fe68afccdce50aa4d2b0e1e201c9058b5f378fca
nevainero 4 years ago
parent f25f9c8d42
commit fe68afccdc
  1. 4
      src/features/AuthServiceApp/components/Registration/hooks.tsx

@ -1,11 +1,14 @@
import { SyntheticEvent, useState } from 'react'
import { useHistory } from 'react-router'
import { useAuthFields } from 'features/AuthServiceApp/hooks/useAuthFields'
import { registerCheck } from '../../requests/register'
import { useParamsUrl } from '../../hooks/useParamsUrl'
import { PAGES } from '../../config/pages'
export const useRegistrationForm = () => {
const history = useHistory()
const urlParams = useParamsUrl()
const [authError, setAuthError] = useState('')
const [termsAccepted, setTermsAccepted] = useState(false)
@ -49,6 +52,7 @@ export const useRegistrationForm = () => {
const handleModalClose = () => {
setIsModalOpen(false)
history.replace(PAGES.login)
}
const onTermsChange = () => {

Loading…
Cancel
Save