Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #87

Merged
merged 45 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bc08b55
feat:Added new site data and some minor changes
ayussh-2 Jun 11, 2024
15c278e
feat: added updated events section
ayussh-2 Jun 11, 2024
7f1bedd
Merge branch 'main' into ayush
ayussh-2 Jun 11, 2024
84ce37c
chore: added text sizes from tailwind
ayussh-2 Jun 11, 2024
60f6c3f
feat: added Registartion page
ayussh-2 Jun 12, 2024
c40af02
Merge branch 'main' into ayush
ayussh-2 Jun 12, 2024
881d060
chore:updated backgrounf image of Registerpage
ayussh-2 Jun 12, 2024
610e1b3
chore: changes after conflict
ayussh-2 Jun 12, 2024
ca85927
chore: few fixes
ayussh-2 Jun 12, 2024
22b6418
Merge branch 'main' into ayush
ayussh-2 Jun 12, 2024
52d53d3
chore:updatd bg
ayussh-2 Jun 12, 2024
0a3a796
Merge branch 'main' into ayush
ayussh-2 Jun 12, 2024
836369f
Merge branch 'dscnitrourkela:main' into ayush
ayussh-2 Jun 17, 2024
b2c528d
added registration form and cloudinary api
ayussh-2 Jun 17, 2024
41fb200
chore:cloudinary fix and google sign in fix
ayussh-2 Jun 18, 2024
340f6a4
chore: added queries and mutaitions
ayussh-2 Jun 18, 2024
df86ca2
chore:added zod validation
ayussh-2 Jun 18, 2024
ce5077f
chore:validation fix
ayussh-2 Jun 18, 2024
13f01bc
fix: fixed according to the changes
ayussh-2 Jun 19, 2024
2781206
chore: improvements to form and added cookies.
ayussh-2 Jun 19, 2024
c16151e
chore: removed cookies and added GET_USER_BY_ID check
ayussh-2 Jun 20, 2024
e7d6a8f
Merge branch 'main' into registrationForm
ayussh-2 Jun 20, 2024
989da46
fix:prettier
ayussh-2 Jun 20, 2024
bc1327d
Merge branch 'registrationForm' of https://github.com/ayussh-2/projec…
ayussh-2 Jun 20, 2024
8d50c8e
fix: prettier formatting
ayussh-2 Jun 20, 2024
5238ae1
fix: fixed authcotext err
ayussh-2 Jun 20, 2024
23928d8
Merge branch 'main' into registrationForm
anmol5936 Jun 20, 2024
6696842
fix: added fixes to query and mutations
ayussh-2 Jun 20, 2024
945cf8f
feat: started profile view in progress
ayussh-2 Jun 21, 2024
abbfef6
chore:ui finished
ayussh-2 Jun 21, 2024
8f1749f
Merge branch 'main' into registrationForm
Srish-ty Jun 21, 2024
670fac9
feat:completed profile menu
ayussh-2 Jun 21, 2024
7f72041
Merge branch 'registrationForm' of https://github.com/ayussh-2/projec…
ayussh-2 Jun 21, 2024
2b9c3ee
Merge branch 'main' into registrationForm
Srish-ty Jun 21, 2024
1dab074
chore:added college
ayussh-2 Jun 21, 2024
e904bd5
Merge branch 'registrationForm' of https://github.com/ayussh-2/projec…
ayussh-2 Jun 21, 2024
0b7ce61
Merge branch 'dscnitrourkela:main' into registrationForm
ayussh-2 Jun 27, 2024
140e45d
Merge branch 'main' into registrationForm
anmol5936 Jul 6, 2024
be9a790
Merge branch 'main' into registrationForm
ayussh-2 Jul 8, 2024
d172856
chore:authenticates user
ayussh-2 Jul 8, 2024
69e9a29
chore: footer toast fixes and registration form fixes
ayussh-2 Jul 8, 2024
bd9c686
added orgId to fix authorization error
ayussh-2 Jul 9, 2024
8bf8bc6
fix:some fixes
ayussh-2 Jul 9, 2024
8941447
fix: important fixes
ayussh-2 Jul 9, 2024
a4c399d
Merge branch 'main' into av2
ayussh-2 Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components/marginals/Nav_Hero/Description.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
ButtonContainer,
DescriptionContainer,
DescriptionParagraph,
DescriptionTitle
DescriptionTitle,
PaymentButton
} from './Description.styles'
import { DescriptionContent } from '../../../config/index'
import { ButtonWrapper } from './Description.styles'
Expand All @@ -25,7 +26,13 @@ const Description = () => {
<ButtonWrapper>
<ButtonContainer>
<HelpButton onClick={redirect}>{DescriptionContent.HeroButton}</HelpButton>
{!userInfo.name && (
{userInfo.name ? (
<PaymentButton>
<Link target="_blank" to={DescriptionContent.paymentLink}>
Pay Now
</Link>
</PaymentButton>
) : (
<Link to="/register">
<RegisterButton>{DescriptionContent.RegisterButton}</RegisterButton>
</Link>
Expand Down
28 changes: 27 additions & 1 deletion src/components/marginals/Nav_Hero/Description.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,33 @@ export const InnerSpan = styled.span`
export const RegisterButton = styled.button`
${tw`
px-2
py-2
py-2
w-full
0.4xsm:w-[140px]
rounded-[11.53px]
bg-orange-1
text-brown-5
font-semibold
text-1.5lg
md:text-2xl
border-brown-5
border-2
transition
duration-300
ease-in-out
active:transform
active:translate-x-[3px]
active:translate-y-[3px]
active:shadow-none
shadow-[3px 3px 0px #1d1d1d ]`}
`

export const PaymentButton = styled.button`
${tw`
px-2
py-2
w-full
0.4xsm:w-[140px]
rounded-[11.53px]
bg-orange-1
text-brown-5
Expand Down
14 changes: 3 additions & 11 deletions src/components/marginals/Nav_Hero/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const Nav = () => {

function onClick(id) {
handleScroll(id)
console.log(id)
handleToggle()
}

Expand Down Expand Up @@ -92,10 +91,6 @@ const Nav = () => {
</Menu>

{userInfo.name ? (
// <Link to="/" onClick={handleSignOut}>
// <Register>Logout</Register>
// </Link>

<ProfileBtn onMouseEnter={() => setProfileOpen(true)}>
<ProfileMenu isProfileOpen={profileOpen} setProfileOpen={setProfileOpen} />
</ProfileBtn>
Expand All @@ -115,16 +110,13 @@ const Nav = () => {
<ResMen>
<ResList>
{userInfo.name ? (
// <Link to="/" onClick={handleSignOut}>
// <SecRegister>Logout</SecRegister>
// </Link>
<button onClick={handleProfileOpen}>
<ProfileMenu isProfileOpen={profileOpen} setProfileOpen={setProfileOpen} />
</button>
) : (
<button to="/register">
<SecRegister>Register...</SecRegister>
</button>
<Link to="/register">
<SecRegister>Register</SecRegister>
</Link>
)}
{navLinks.map((navLink) => (
<ResItem key={navLink.id}>
Expand Down
1 change: 0 additions & 1 deletion src/components/marginals/Nav_Hero/ProfileMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function ProfileMenu({ isProfileOpen, setProfileOpen }) {
setUid(userInfo.uid)
if (userDataInDb?.getUser) {
setUser(userDataInDb.getUser)
// console.log(userDataInDb.getUser)
}
}
}, [userInfo, userDataInDb, uid])
Expand Down
29 changes: 28 additions & 1 deletion src/components/marginals/Nav_Hero/ProfileMenu.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,19 @@ export const ProfileDropDownItem = styled.div`
export const NotRegistered = styled.div`
${tw`
text-lg
text-brown-2
bg-[#1D1D1D]
text-[#FFEEDA]
rounded-md
py-2
px-4
font-Poppins
font-[500]
text-center
hover:bg-[#FFEEDA]
hover:text-[#1D1D1D]
active:scale-95
duration-300
ease-in-out
`}
`

Expand Down Expand Up @@ -126,3 +135,21 @@ export const LogoutButton = styled.button`
active:scale-95
`}
`
export const PaymentButton = styled.button`
${tw`
mt-5
bg-orange-1
text-[#FFEEDA]
rounded-md
py-2
px-4
cursor-pointer
font-[500]
font-Poppins
duration-300
ease-in-out
hover:bg-[#FFEEDA]
hover:text-[#1D1D1D]
active:scale-95
`}
`
11 changes: 10 additions & 1 deletion src/components/marginals/Nav_Hero/ProfileMenuDropDown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ import {
NotRegistered,
ProfileDropDown,
ProfileDropDownItem,
Value
Value,
PaymentButton
} from './ProfileMenu.styles'

import { DescriptionContent } from '../../../config/index'

ProfileMenuDropDown.propTypes = {
setProfileOpen: propTypes.func,
user: propTypes.object
Expand Down Expand Up @@ -47,6 +50,12 @@ function ProfileMenuDropDown({ setProfileOpen, user }) {
<Label>{detail.label}:</Label> <Value>{detail.value}</Value>
</ProfileDropDownItem>
))}
<PaymentButton>
<Link target="_blank" to={DescriptionContent.paymentLink}>
{' '}
Pay Now
</Link>
</PaymentButton>
<LogoutButton onClick={logout}>Logout</LogoutButton>
</>
) : (
Expand Down
31 changes: 11 additions & 20 deletions src/components/marginals/footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types'
import { toast } from 'react-toastify'

import { useState } from 'react'
import footerData from '../../../config/content/footerData/Footer.js'
import Modal from '../../modal/Modal'
// import React from "react";
import {
AicheLogo1,
Expand Down Expand Up @@ -39,29 +39,20 @@ RenderListItem.propTypes = {
}

export default function MyFooter() {
const [isModalOpen, setIsModalOpen] = useState(false)
const openModal = () => setIsModalOpen(true)
const closeModal = () => setIsModalOpen(false)
function showLocation() {
toast(
<IframeContainer>
<Iframe src={footerData.images.map.src} title={footerData.images.map.title} />
</IframeContainer>,

{
position: 'bottom-left',
autoClose: false,
hideProgressBar: true,
draggable: true,

theme: 'dark',
style: {
width: '200%',
height: '100%'
}
}
)
openModal()
}

return (
<>
<Modal open={isModalOpen} onClose={closeModal}>
<IframeContainer>
<Iframe src={footerData.images.map.src} title={footerData.images.map.title} />
</IframeContainer>
</Modal>
<Footer id="contact">
<FooterTop>
<Logos>
Expand Down
26 changes: 26 additions & 0 deletions src/components/modal/Modal.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Modal.js
import ReactDOM from 'react-dom'
import { Overlay, ModalContainer, CloseButton } from './Modal.styles'
import PropTypes from 'prop-types'

const Modal = ({ children, open, onClose }) => {
if (!open) return null

return ReactDOM.createPortal(
<Overlay onClick={onClose}>
<ModalContainer onClick={(e) => e.stopPropagation()}>
<CloseButton onClick={onClose}>&times;</CloseButton>
{children}
</ModalContainer>
</Overlay>,
document.getElementById('overlay')
)
}

Modal.propTypes = {
children: PropTypes.node.isRequired,
open: PropTypes.bool.isRequired,
onClose: PropTypes.func.isRequired
}

export default Modal
21 changes: 21 additions & 0 deletions src/components/modal/Modal.styles.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Modal.styles.jsx
import tw from 'twin.macro'
import styled from 'styled-components'

export const Overlay = styled.div`
${tw`fixed inset-0 bg-black-1 bg-opacity-50 flex items-center justify-center`}
z-index: 50;
`

export const ModalContainer = styled.div`
${tw`bg-white-1 p-1 0.4xsm:p-6 rounded-lg shadow-lg relative`}
width: 90%;
max-width: 500px;
`

export const CloseButton = styled.button`
${tw`absolute top-0 right-0 mt-0 mr-2 rounded-full text-red-500 text-2xl 0.4xsm:text-5xl`}
background: none;
border: none;
cursor: pointer;
`
13 changes: 10 additions & 3 deletions src/components/registrationForm/InputField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ function InputField({
input: { id, label, placeholder, type, extras },
handleFormData,
value,
error
error,
showTshirtSizes
}) {
const handleChange = (e) => {
handleFormData(id, e.target.value)
}

function handleTshirtCLick(e) {
e.preventDefault()
showTshirtSizes()
}

return (
<InputContainer key={id}>
<Label htmlFor={id}>{label}</Label>
Expand All @@ -33,7 +39,7 @@ function InputField({
onChange={handleChange}
/>
{extras && (
<InfoBtn>
<InfoBtn onClick={(e) => handleTshirtCLick(e)}>
<Info src={info} alt="info-icon" />
</InfoBtn>
)}
Expand All @@ -59,7 +65,8 @@ InputField.propTypes = {
}).isRequired,
handleFormData: PropTypes.func.isRequired,
value: PropTypes.string,
error: PropTypes.string
error: PropTypes.string,
showTshirtSizes: PropTypes.func
}

export default InputField
9 changes: 8 additions & 1 deletion src/components/registrationForm/RegisterForm.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DateTxT = styled.h1`
${tw`text-brown-2 2.7md:text-4xl font-semibold text-3xl`}
`
export const FormContainer = styled.form`
${tw`flex flex-col justify-center items-center h-full w-full gap-[24px] md:gap-4 py-5 md:py-10 px-4 md:px-14 bg-transparent`}
${tw`flex flex-col justify-center items-center h-full w-full gap-[24px] md:gap-4 py-5 md:py-16 px-4 md:px-14 bg-transparent`}
`

export const SignInContainer = styled.div`
Expand Down Expand Up @@ -56,3 +56,10 @@ export const MobileHeader = styled.div`
export const MobileDate = styled.h1`
${tw`text-brown-4 text-[23px] font-[600]`}
`

export const TshirtContainer = styled.div`
${tw`flex flex-col justify-center items-center w-full`}
`
export const TshirtImage = styled.img`
${tw`w-full`}
`
Loading
Loading