generated from ctc-uci/npo-frontend-vite-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 178-volunteer-events-page-side-view-mobile-bug
- Loading branch information
Showing
54 changed files
with
6,310 additions
and
8,065 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { Box, SimpleGrid, Image, Heading } from '@chakra-ui/react'; | ||
import S2T_Logo from '../../Assets/S2T_Logo.png'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const AuthPage = ({ children }) => { | ||
return ( | ||
<SimpleGrid columns={2} spacing={0} minH={'100vh'} style={{ fontFamily: 'Poppins' }}> | ||
<Box | ||
backgroundColor="#2D558A" | ||
position="relative" | ||
display={'flex'} | ||
flexDir={'column'} | ||
justifyContent={'center'} | ||
alignItems={'center'} | ||
> | ||
<Image | ||
borderRadius="full" | ||
src={S2T_Logo} | ||
alt="Logo" | ||
px={['1rem', '2rem', '4rem']} | ||
maxH={'24rem'} | ||
/> | ||
<Box | ||
sytle={{ display: 'flex', flexDir: 'column', justifyContent: 'center', gap: 10 }} | ||
width={'100%'} | ||
objectFit={'cover'} | ||
px={['1rem', '2rem', '4rem']} | ||
> | ||
<Heading | ||
style={{ | ||
color: 'white', | ||
// fontSize: '40px', | ||
fontWeight: '600', | ||
// marginTop: '52px', | ||
textAlign: 'center', | ||
}} | ||
fontSize={['24px', '32px', '40px']} | ||
> | ||
Stand Up To Trash | ||
</Heading> | ||
<Heading | ||
style={{ | ||
color: 'white', | ||
// fontSize: '32px', | ||
fontWeight: '600', | ||
// marginTop: '20px', | ||
textAlign: 'center', | ||
}} | ||
fontSize={['16px', '24px', '32px']} | ||
> | ||
Making a Difference | ||
</Heading> | ||
</Box> | ||
</Box> | ||
<Box display={'flex'} h="100%" justifyContent={'center'} alignContent={'center'} mx={4}> | ||
{children} | ||
</Box> | ||
</SimpleGrid> | ||
); | ||
}; | ||
|
||
AuthPage.propTypes = { | ||
children: PropTypes.node, | ||
}; | ||
|
||
export default AuthPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import RegistrationModal from './RegistrationModal'; | ||
import { Box, Text, Flex, Spinner } from '@chakra-ui/react'; | ||
|
||
const LoadingModal = ({ ...props }) => { | ||
return ( | ||
<RegistrationModal {...props} buttons={<></>}> | ||
<Flex align={'center'} justify={'center'} w="100%" pt="80px" mb="46px"> | ||
<Spinner color="blue.500" size={'xl'} speed="0.8s" thickness="6px" /> | ||
</Flex> | ||
<Box> | ||
<Text fontFamily={'Avenir'} fontSize={'30px'} align={'center'} fontWeight={800}> | ||
{`Registering...`} | ||
</Text> | ||
<Text | ||
color={'#717171'} | ||
fontSize={'22px'} | ||
align={'center'} | ||
fontFamily={'Avenir'} | ||
fontWeight={800} | ||
> | ||
{`Hang tight, and you'll registered soon!`} | ||
</Text> | ||
</Box> | ||
</RegistrationModal> | ||
); | ||
}; | ||
|
||
export default LoadingModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
import RegistrationModal from './RegistrationModal'; | ||
import { Flex, Icon, Text, Link, Input } from '@chakra-ui/react'; | ||
import { VscSparkleFilled } from 'react-icons/vsc'; | ||
import { GoArrowRight } from 'react-icons/go'; | ||
import { useContext } from 'react'; | ||
import UserContext from '../../utils/UserContext'; | ||
|
||
const NameAndEmailModal = ({ ...props }) => { | ||
const { user } = useContext(UserContext); | ||
return ( | ||
<RegistrationModal title="What is your name and Email?" {...props}> | ||
<Flex | ||
flexDir={'column'} | ||
backgroundColor={'#DAEBFF'} | ||
p={'1em'} | ||
borderRadius={'12px'} | ||
mb={'1em'} | ||
> | ||
<Flex align={'center'} gap={'0.25em'}> | ||
<Flex | ||
justify={'center'} | ||
align={'center'} | ||
backgroundColor={'#0075FF'} | ||
w={'1.5em'} | ||
h={'1.5em'} | ||
borderRadius={'4px'} | ||
flexDir={'column'} | ||
> | ||
<Icon as={VscSparkleFilled} color={'white'} /> | ||
</Flex> | ||
<Text as={'b'} fontSize={'1.25em'} color={'#3B3B3B'}> | ||
Autofilled from your profile | ||
</Text> | ||
</Flex> | ||
|
||
<Flex align={'center'} gap={'0.25em'}> | ||
<Flex | ||
justify={'center'} | ||
align={'center'} | ||
backgroundColor={'#10C13F'} | ||
w={'1.5em'} | ||
h={'1.5em'} | ||
borderRadius={'4px'} | ||
flexDir={'column'} | ||
visibility={'hidden'} | ||
> | ||
<Icon as={VscSparkleFilled} color={'white'} /> | ||
</Flex> | ||
<Text color={'#717171'}>Collected from your account</Text> | ||
</Flex> | ||
|
||
<Flex align={'center'} mt={'0.5em'} gap={'0.25em'}> | ||
<Flex | ||
justify={'center'} | ||
align={'center'} | ||
backgroundColor={'#10C13F'} | ||
w={'1.5em'} | ||
h={'1.5em'} | ||
borderRadius={'4px'} | ||
flexDir={'column'} | ||
visibility={'hidden'} | ||
> | ||
<Icon as={VscSparkleFilled} color={'white'} /> | ||
</Flex> | ||
<Link color={'#0075FF'} fontWeight={600} fontSize={'1.15em'} href="/profile"> | ||
Change information | ||
</Link> | ||
<Icon as={GoArrowRight} color={'#0075FF'} boxSize={'1.65em'} ml={'0.2em'} /> | ||
</Flex> | ||
</Flex> | ||
|
||
<Flex flexDir={'column'}> | ||
<Flex mb={'1em'} gap={'1em'}> | ||
<Flex flexDir={'column'}> | ||
<Text fontWeight={600} color={'#3B3B3B'}> | ||
First Name | ||
</Text> | ||
<Input | ||
value={user.first_name} | ||
fontSize={'1.25em'} | ||
borderColor={'#EFEFEF'} | ||
borderWidth={'4px'} | ||
h={'2.5em'} | ||
color={'#3B3B3B'} | ||
_disabled={{ color: '#3B3B3B', fontWeight: 500 }} | ||
_hover={{ borderColor: '#EFEFEF' }} | ||
disabled | ||
/> | ||
</Flex> | ||
|
||
<Flex flexDir={'column'}> | ||
<Text fontWeight={600} color={'#3B3B3B'}> | ||
Last Name | ||
</Text> | ||
<Input | ||
value={user.last_name} | ||
borderRadius={'4px'} | ||
fontSize={'1.25em'} | ||
borderColor={'#EFEFEF'} | ||
borderWidth={'4px'} | ||
h={'2.5em'} | ||
color={'#3B3B3B'} | ||
_disabled={{ color: '#3B3B3B', fontWeight: 500 }} | ||
_hover={{ borderColor: '#EFEFEF' }} | ||
disabled | ||
/> | ||
</Flex> | ||
</Flex> | ||
|
||
<Flex flexDir={'column'}> | ||
<Text fontWeight={600} color={'#3B3B3B'}> | ||
</Text> | ||
<Input | ||
value={user.email} | ||
borderRadius={'4px'} | ||
fontSize={'1.25em'} | ||
borderColor={'#EFEFEF'} | ||
borderWidth={'4px'} | ||
h={'2.5em'} | ||
_disabled={{ color: '#3B3B3B', fontWeight: 500 }} | ||
_hover={{ borderColor: '#EFEFEF' }} | ||
disabled | ||
/> | ||
</Flex> | ||
</Flex> | ||
</RegistrationModal> | ||
); | ||
}; | ||
|
||
export default NameAndEmailModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { Icon, Flex, Text } from '@chakra-ui/react'; | ||
import RegistrationModal from './RegistrationModal'; | ||
import PropTypes from 'prop-types'; | ||
import { useState } from 'react'; | ||
import { AddIcon, MinusIcon } from '@chakra-ui/icons'; | ||
|
||
const PartySizeModal = ({ registrationFlowState, ...props }) => { | ||
// Copy to prevent mutating original instance | ||
registrationFlowState = { ...registrationFlowState }; | ||
registrationFlowState.continueActive = | ||
registrationFlowState.continueActive && | ||
registrationFlowState.partySize > 0 && | ||
registrationFlowState.partySize <= 100; | ||
|
||
const [partySize, setPartySize] = useState(registrationFlowState.partySize); | ||
return ( | ||
<RegistrationModal | ||
title="How many people are in your party?" | ||
registrationFlowState={registrationFlowState} | ||
{...props} | ||
> | ||
<Flex flexDir={'column'} justify={'center'} align={'center'}> | ||
<Flex | ||
align={'center'} | ||
borderRadius={'12px'} | ||
borderWidth={'4px'} | ||
w={'10em'} | ||
h={'6em'} | ||
justify={'center'} | ||
> | ||
<Flex | ||
justify={'center'} | ||
align={'center'} | ||
h={'100%'} | ||
w={'33%'} | ||
onClick={() => { | ||
setPartySize(prev => prev - 1); | ||
registrationFlowState.setPartySize(prev => prev - 1); | ||
}} | ||
_hover={{ cursor: 'pointer' }} | ||
> | ||
<Icon as={MinusIcon} color={'#BABABA'} boxSize={'1.5em'} /> | ||
</Flex> | ||
<Flex justify={'center'} align={'center'} h={'100%'} w={'33%'}> | ||
<Text as={'b'} fontSize={'2em'}> | ||
{partySize} | ||
</Text> | ||
</Flex> | ||
<Flex | ||
justify={'center'} | ||
align={'center'} | ||
h={'100%'} | ||
w={'33%'} | ||
onClick={() => { | ||
setPartySize(prev => prev + 1); | ||
registrationFlowState.setPartySize(prev => prev + 1); | ||
}} | ||
_hover={{ cursor: 'pointer' }} | ||
> | ||
<Icon as={AddIcon} color={'#BABABA'} boxSize={'1.5em'} /> | ||
</Flex> | ||
</Flex> | ||
<Text color={'#717171'} fontWeight={600} fontSize={'1.25em'}> | ||
Total people attending | ||
</Text> | ||
</Flex> | ||
</RegistrationModal> | ||
); | ||
}; | ||
|
||
PartySizeModal.propTypes = { | ||
registrationFlowState: PropTypes.object, | ||
}; | ||
|
||
export default PartySizeModal; |
Oops, something went wrong.