Skip to content

Commit

Permalink
Merge pull request #2827 from Northeastern-Electric-Racing/#2710-recr…
Browse files Browse the repository at this point in the history
…uitment-create-acceptance-page

#2710: Created acceptance page for PNM
  • Loading branch information
Aaryan1203 authored Sep 19, 2024
2 parents 9e7b361 + 75d358c commit beb6fba
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions src/frontend/src/pages/AcceptedPage/AcceptedPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { Typography, Box, Grid } from '@mui/material';
import PageLayout from '../../components/PageLayout';
import { AuthenticatedUser, TeamType } from 'shared';
import LoadingIndicator from '../../components/LoadingIndicator';
import ErrorPage from '../ErrorPage';
import { useSingleUserSettings } from '../../hooks/users.hooks';
import { NERButton } from '../../components/NERButton';

interface AcceptedPageProps {
user: AuthenticatedUser;
team: TeamType;
}

const AcceptedPage = ({ user, team }: AcceptedPageProps) => {
const { isLoading, isError, error, data: userSettingsData } = useSingleUserSettings(user.userId);

if (isLoading || !userSettingsData) return <LoadingIndicator />;
if (isError) return <ErrorPage error={error} message={error.message} />;

return (
<PageLayout title="Accepted" hidePageTitle>
<Box sx={{ mt: 6, ml: 4 }}>
<Typography variant="h2" marginLeft="auto" sx={{ marginTop: 2, textAlign: 'center', pt: 3, padding: 0 }}>
Congratulations, {user.firstName}!
</Typography>
<Typography
variant="h3"
marginLeft="auto"
sx={{ marginTop: 2, textAlign: 'center', pt: 1, padding: 0, fontWeight: 1 }}
>
We are so excited to welcome you to Northeastern Electric Racing!
</Typography>
</Box>
<Box
component="img"
src={'../NER-Logo-App-Icon.png'}
sx={{
width: '25%',
height: '25%',
display: 'block',
marginLeft: 'auto',
marginRight: 'auto',
marginTop: 4
}}
/>
<Box sx={{ mt: 2, ml: 2 }}>
<Typography
variant="h6"
marginLeft="auto"
sx={{ marginTop: 2, textAlign: 'center', pt: 3, padding: 0, fontFamily: 'oswald', fontWeight: 1, fontSize: 25 }}
>
Before you get started on the {team.name}, all new members will have to complete general and subteam-specific
onboarding. Please accept this offer within 5 days to start onboarding.
</Typography>
<Typography
variant="h6"
marginLeft="auto"
sx={{ marginTop: 1, textAlign: 'center', pt: 3, padding: 0, fontFamily: 'oswald', fontWeight: 1, fontSize: 25 }}
>
We can't wait to see you around and all that you'll accomplish!
</Typography>
</Box>
<Box
sx={{
display: 'flex',
justifyContent: 'center',
mt: 7,
width: '100%'
}}
>
<Grid container justifyContent="center" spacing={8} sx={{ maxWidth: '500px' }}>
<Grid item>
<NERButton variant="contained" sx={{ fontSize: 20 }}>
Accept
</NERButton>
</Grid>
<Grid item>
<NERButton variant="contained" sx={{ fontSize: 20 }}>
Reject
</NERButton>
</Grid>
</Grid>
</Box>
</PageLayout>
);
};
export default AcceptedPage;

0 comments on commit beb6fba

Please sign in to comment.