diff --git a/package-lock.json b/package-lock.json index 0885bddf..8fb81f25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@babel/core": "^7.25.7", + "@babel/core": "^7.25.2", "@babel/preset-react": "^7.25.7", "autoprefixer": "^10.4.15", "babel-loader": "^9.2.1", diff --git a/src/app/register/RegistrationModal.jsx b/src/app/register/RegistrationModal.jsx new file mode 100644 index 00000000..469994d8 --- /dev/null +++ b/src/app/register/RegistrationModal.jsx @@ -0,0 +1,37 @@ +// RegistrationModal.js +import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; +import Image from 'next/image'; +import { closeIcon } from '@/config/content/Footer'; + +export const RegistrationModal = ({ isOpen, onClose }) => { + return ( + + + + + + + + 🚀 Coming Soon + + + Stay tuned for exciting updates! Registration will open soon. + + + + + ); +}; diff --git a/src/app/register/page.jsx b/src/app/register/page.jsx index a7f1c274..f4b202dc 100644 --- a/src/app/register/page.jsx +++ b/src/app/register/page.jsx @@ -20,6 +20,7 @@ import { useUserDetails } from '@/hooks/useUserDetails'; import CampusAmbassador from '@/components/Register/CampusAmbassador/CampusAmbassador'; import { PrimaryButton } from '@/components/shared/Typography/Buttons'; import { AuthContext } from '@/context/auth-context'; +import { RegistrationModal } from './RegistrationModal'; function Page() { const [userDetails, setUserDetails] = useState({ name: '', @@ -161,10 +162,21 @@ function Page() { } } + const [isModalOpen, setModalOpen] = useState(false); + + function handleSubmit() { + const isFormValid = validateForm(); + if (!isFormValid) return; + setModalOpen(true); + console.log(userDetails); + } + return ( - {isLoggedIn ? ( + + {/* //---------------------commented out google auth part--------------------- */} + {/* {isLoggedIn ? ( Register @@ -185,7 +197,26 @@ function Page() { {authLoading ? 'Loading...' : 'Sign In with Google'} - )} + )} */} + {/* //---------------------commented out google auth part--------------------- */} + + + Register + + {formFields.map((field) => { + return returnFormFields(field); + })} + + + + Submit + + + setModalOpen(false)} /> ); } diff --git a/src/components/Marginals/Footer/Footer.jsx b/src/components/Marginals/Footer/Footer.jsx index ebe22c91..6f6feb47 100644 --- a/src/components/Marginals/Footer/Footer.jsx +++ b/src/components/Marginals/Footer/Footer.jsx @@ -25,29 +25,15 @@ import { FooterGradient, ListTitle, SocialImageContainer, - Overlay, - Modal, } from './styles'; import { LogoText2 } from '../../shared/Typography/Headings'; -// import { createPortal } from 'react-dom'; import { PaymentPolicyModal } from './PaymentPolicyModel'; -import { useEffect, useState } from 'react'; -import { createPortal } from 'react-dom'; -// import { Modal } from 'flowbite-react'; +import { useState } from 'react'; export const Footer = () => { const [isRegisterModalOpen, setIsRegisterModalOpen] = useState(false); - const [modalRoot, setModalRoot] = useState(null); - const handleRegisterModalOpen = () => setIsRegisterModalOpen(true); const handleRegisterModalClose = () => setIsRegisterModalOpen(false); - - useEffect(() => { - const root = document.getElementById('modal-root'); - if (root) { - setModalRoot(root); - } - }, []); return ( <> @@ -123,17 +109,7 @@ export const Footer = () => { - - {modalRoot && - isRegisterModalOpen && - createPortal( - - - - - , - modalRoot, - )} + > ); }; diff --git a/src/components/Marginals/Footer/PaymentPolicyModel.jsx b/src/components/Marginals/Footer/PaymentPolicyModel.jsx index 5fbcde91..b4172838 100644 --- a/src/components/Marginals/Footer/PaymentPolicyModel.jsx +++ b/src/components/Marginals/Footer/PaymentPolicyModel.jsx @@ -1,15 +1,30 @@ -// import { Modal, Overlay } from '../eventCardComponents/eventCard.style'; -// import { ModalExit, ModalText } from './registerModal.styles'; +import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; +import { closeIcon } from '@/config/content/Footer'; +import Image from 'next/image'; +import { ModalText, Para } from './styles'; -// import { Modal } from "flowbite-react"; -import { Paragraph, SmallParagraph } from '../../shared/Typography/Paragraphs'; -import { Modal, ModalExit, ModalText, Overlay, Para } from './styles'; - -export const PaymentPolicyModal = ({ isClose }) => { +export const PaymentPolicyModal = ({ isOpen, onClose }) => { return ( - <> - - + + + + + + Pricing The registration fees for Innovision 2024 is ₹899 for all the students from outside NIT @@ -25,11 +40,8 @@ export const PaymentPolicyModal = ({ isClose }) => { There will be no refund of the registration fees under any circumstances unless the fest is cancelled by team Innovision. - - close - - - - > + + + ); };
+ 🚀 Coming Soon +
+ Stay tuned for exciting updates! Registration will open soon. +