Commit 3aadc4c2 by Arjun Jhukal

integrated acuitytec in modal

parent 26aeeaf1
...@@ -15,7 +15,6 @@ import { ArrowLeft } from '@wandersonalwes/iconsax-react'; ...@@ -15,7 +15,6 @@ import { ArrowLeft } from '@wandersonalwes/iconsax-react';
import dayjs, { Dayjs } from 'dayjs'; import dayjs, { Dayjs } from 'dayjs';
import { useFormik } from 'formik'; import { useFormik } from 'formik';
import Link from 'next/link'; import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useState } from 'react'; import { useState } from 'react';
import * as Yup from 'yup'; import * as Yup from 'yup';
import AuthMessageBlock from '../authMessageBlock'; import AuthMessageBlock from '../authMessageBlock';
...@@ -112,7 +111,7 @@ export default function RegisterPage() { ...@@ -112,7 +111,7 @@ export default function RegisterPage() {
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const [isAcuityModalOpen, setIsAcuityModalOpen] = useState(false); const [isAcuityModalOpen, setIsAcuityModalOpen] = useState(false);
const [acuityUrl, setAcuityUrl] = useState(''); const [acuityUrl, setAcuityUrl] = useState('');
const route = useRouter(); // const route = useRouter();
const initialValues = { const initialValues = {
first_name: '', first_name: '',
middle_name: '', middle_name: '',
...@@ -169,10 +168,10 @@ export default function RegisterPage() { ...@@ -169,10 +168,10 @@ export default function RegisterPage() {
}), }),
); );
if (response?.data?.redirection_url) { if (response?.data?.redirection_url) {
window.open(response?.data?.redirection_url, "_blank"); // window.open(response?.data?.redirection_url, "_blank");
setAcuityUrl(response.data.redirection_url); setAcuityUrl(response.data.redirection_url);
// setIsAcuityModalOpen(true); setIsAcuityModalOpen(true);
route.replace(PATH.AUTH.LOGIN.ROOT) // route.replace(PATH.AUTH.LOGIN.ROOT)
} }
} }
...@@ -553,7 +552,7 @@ export default function RegisterPage() { ...@@ -553,7 +552,7 @@ export default function RegisterPage() {
<FormControlLabel <FormControlLabel
control={<Checkbox control={<Checkbox
checked={values.agree} checked={values.agree}
onChange={() => setFieldValue("agree", !values.agree)} onChange={() => setFieldValue("agree", true)}
/>} />}
label="I agree to the terms and conditions" /> label="I agree to the terms and conditions" />
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment