|
|
|
|
@ -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 = () => { |
|
|
|
|
|