Skip to content

Commit

Permalink
Merge pull request #2836 from Northeastern-Electric-Racing/#2794-Crea…
Browse files Browse the repository at this point in the history
…te-Member-Encouragement

#2794 Component with button to encourage memberst to go to teams
  • Loading branch information
walker-sean authored Sep 19, 2024
2 parents 1fa1529 + 2a0b1c6 commit 4604985
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/pages/HomePage/GuestHomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PageLayout from '../../components/PageLayout';
import { AuthenticatedUser } from 'shared';
import ImageWithButton from './components/ImageWithButton';
import emitter from '../../app/EventBus';
import MemberEncouragement from './components/MemberEncouragement';

interface GuestHomePageProps {
user: AuthenticatedUser;
Expand All @@ -20,6 +21,7 @@ const GuestHomePage = ({ user, setOnMemberHomePage }: GuestHomePageProps) => {
<Typography variant="h3" textAlign="center" sx={{ mt: 2, pt: 3 }}>
{user ? `Welcome, ${user.firstName}!` : 'Welcome, Guest!'}
</Typography>
<MemberEncouragement />
<Box sx={{ display: 'flex', mt: 4 }}>
<Box sx={{ display: 'flex', padding: '50px', gap: 5 }}>
<ImageWithButton
Expand Down
48 changes: 48 additions & 0 deletions src/frontend/src/pages/HomePage/components/MemberEncouragement.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react';
import { Box, Alert, Typography, Grid } from '@mui/material';
import { routes } from '../../../utils/routes';
import { NERButton } from '../../../components/NERButton';
import { useHistory } from 'react-router-dom';

const MemberEncouragement: React.FC = () => {
const history = useHistory();
return (
<Box sx={{ width: '100%', my: 2, mx: 'auto' }}>
<Alert
variant="filled"
severity="info"
icon={false}
sx={{
'& .MuiAlert-message': {
width: '100%'
}
}}
>
<Grid container alignItems="center" justifyContent="space-between">
<Grid item>
<Typography variant="h6" color="white">
Already a member?
</Typography>
<Typography variant="body2" color="white">
Talk to the head of your team to become a member and get added to the team on FinishLine!
</Typography>
</Grid>
<Grid item>
<NERButton
variant="contained"
size="small"
sx={{ color: 'white' }}
onClick={() => {
history.push(routes.TEAMS);
}}
>
See Teams &gt;
</NERButton>
</Grid>
</Grid>
</Alert>
</Box>
);
};

export default MemberEncouragement;

0 comments on commit 4604985

Please sign in to comment.