From d998b7e0cb647f598d3ab275829c1fbaaa29a6ff Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Thu, 2 Nov 2023 18:38:53 +0530 Subject: [PATCH] chore: revert closing of registration (#112) --- .../Registration/RegistrationForm.jsx | 102 +++++++++--------- src/pages/payment.js | 41 +++---- src/utils/Api.js | 8 +- 3 files changed, 74 insertions(+), 77 deletions(-) diff --git a/src/components/Registration/RegistrationForm.jsx b/src/components/Registration/RegistrationForm.jsx index f4a968a..197a6c4 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 { Body1, Body2, ButtonText, Heading2, Heading4, Input } from '../shared'; +import { Body2, ButtonText, Heading2, Input } from '../shared'; import { InputContainer, RegistrationCard, RegistrationCardTitle } from './styles'; import Button from '../shared/Button'; import { SHOW, verify, verifyAll } from './utils'; @@ -60,61 +60,57 @@ export const RegistrationForm = () => { - {isNITR ? 'Registration form' : 'Registration has been closed'} + {/* {isNITR ? 'Registration form' : 'Registration has been closed'} */} + Registration form - {isNITR && ( - - Student from NIT Rourkela - setIsNITR((prev) => !prev)} - className='cursor-pointer' - outline - > - Change - - - )} + + {isNITR ? 'Student from NIT Rourkela' : 'Student from other college'} + setIsNITR((prev) => !prev)} className='cursor-pointer' outline> + Change + + + {/* {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'; + } - {isNITR ? ( - <> - - {Object.entries(inputData) - .filter(([, value]) => SHOW.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} + /> +
+ ); + })} +
-