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

#2794 Component with button to encourage memberst to go to teams #2836

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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;
Loading