From 83a537f4e1150d0564cb2574dd11b847619639ac Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:08:44 +0530 Subject: [PATCH] chore: close registration --- src/components/Payment/styles.jsx | 1 + .../Registration/RegistrationForm.jsx | 111 +++++++++++------- src/components/shared/Typography/Heading4.jsx | 2 + src/pages/payment.js | 41 ++++--- 4 files changed, 95 insertions(+), 60 deletions(-) diff --git a/src/components/Payment/styles.jsx b/src/components/Payment/styles.jsx index 826a1e5..70bce1b 100644 --- a/src/components/Payment/styles.jsx +++ b/src/components/Payment/styles.jsx @@ -7,6 +7,7 @@ export const PaymentCardContainer = styled.div` p-9 bg-background-dark text-center + rounded-xl `} `; diff --git a/src/components/Registration/RegistrationForm.jsx b/src/components/Registration/RegistrationForm.jsx index 51f3384..13dc2bc 100644 --- a/src/components/Registration/RegistrationForm.jsx +++ b/src/components/Registration/RegistrationForm.jsx @@ -2,7 +2,7 @@ import React, { useContext, useEffect } from 'react'; import { navigate } from 'gatsby'; import { toast } from 'react-toastify'; import { RegistrationContext } from './RegistrationContext'; -import { Body2, ButtonText, Heading2, Input } from '../shared'; +import { Body1, Body2, ButtonText, Heading2, Heading4, Input } from '../shared'; import { InputContainer, RegistrationCard, RegistrationCardTitle } from './styles'; import Button from '../shared/Button'; import { SHOW, verify, verifyAll } from './utils'; @@ -59,52 +59,77 @@ export const RegistrationForm = () => { return ( - Registration form - - {isNITR ? 'Student from NIT Rourkela' : 'Student from other college'} - setIsNITR((prev) => !prev)} className='cursor-pointer' outline> - Change - - + + {isNITR ? 'Registration form' : 'Registration has been closed'} + + {isNITR && ( + + Student from NIT Rourkela + setIsNITR((prev) => !prev)} + className='cursor-pointer' + outline + > + Change + + + )} - - {Object.entries(inputData) - .filter(([, value]) => - isNITR ? SHOW.NITR.includes(value.show) : SHOW.NON_NITR.includes(value.show), - ) - .map(([key, value], index, array) => { - let gridCols; - if (array.length <= 4) { - gridCols = 'span 4'; - } else if (index === array.length - 1 && index % 2 === 0) { - gridCols = '2 / 4'; - } else { - gridCols = 'span 2'; - } + {isNITR ? ( + <> + + {Object.entries(inputData) + .filter(([, value]) => + isNITR ? SHOW.NITR.includes(value.show) : SHOW.NON_NITR.includes(value.show), + ) + .map(([key, value], index, array) => { + let gridCols; + if (array.length <= 4) { + gridCols = 'span 4'; + } else if (index === array.length - 1 && index % 2 === 0) { + gridCols = '2 / 4'; + } else { + gridCols = 'span 2'; + } - return ( -
- setInputValue(key, e.target.value)} - onBlur={onBlur} - /> -
- ); - })} -
+ return ( +
+ setInputValue(key, e.target.value)} + onBlur={onBlur} + /> +
+ ); + })} +
-