Skip to content

Commit 06204d6

Browse files
committed
#4003 changes from review
1 parent 2d0ceae commit 06204d6

2 files changed

Lines changed: 23 additions & 18 deletions

File tree

src/frontend/src/pages/GuestProjectsPage/GuestProjectsCard.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const GuestProjectsCard: React.FC<ProjectCardProps> = ({ project }) => {
4242
>
4343
{wbsNamePipe(singleProject)}
4444
</Typography>
45-
{activeWorkPackages[0] ? (
45+
{activeWorkPackages[0]?.stage ? (
4646
<Chip
4747
size="medium"
4848
variant="filled"
@@ -52,7 +52,7 @@ const GuestProjectsCard: React.FC<ProjectCardProps> = ({ project }) => {
5252
bgcolor: alpha(theme.palette.primary.main, 0.45),
5353
color: theme.palette.primary.light
5454
}}
55-
label={activeWorkPackages[0]?.stage}
55+
label={activeWorkPackages[0].stage}
5656
/>
5757
) : null}
5858
</Box>
@@ -77,21 +77,25 @@ const GuestProjectsCard: React.FC<ProjectCardProps> = ({ project }) => {
7777
</Box>
7878
</Stack>
7979
<Typography>{singleProject.summary}</Typography>
80-
<Box alignItems={'center'} display={'flex'} justifyContent={'center'} marginTop={2}>
81-
<Link component={RouterLink} to={`/projects/${wbsPipe(project.wbsNum)}`}>
82-
<NERButton
83-
sx={{
84-
backgroundColor: theme.palette.error.main,
85-
color: theme.palette.error.contrastText,
86-
'&:hover': {
87-
backgroundColor: theme.palette.error.dark
88-
}
89-
}}
90-
>
91-
Learn more
92-
</NERButton>
93-
</Link>
94-
</Box>
80+
<Link
81+
component={RouterLink}
82+
to={`/projects/${wbsPipe(project.wbsNum)}`}
83+
sx={{ width: '100%', textDecoration: 'none' }}
84+
>
85+
<NERButton
86+
fullWidth
87+
sx={{
88+
marginTop: 2,
89+
backgroundColor: theme.palette.error.main,
90+
color: theme.palette.error.contrastText,
91+
'&:hover': {
92+
backgroundColor: theme.palette.error.dark
93+
}
94+
}}
95+
>
96+
Learn more
97+
</NERButton>
98+
</Link>
9599
</CardContent>
96100
</Card>
97101
);

src/frontend/src/pages/HomePage/components/FeaturedProjects.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import ScrollablePageBlock from './ScrollablePageBlock';
1212
import EmptyPageBlockDisplay from './EmptyPageBlockDisplay';
1313
import { Box, Stack, useMediaQuery } from '@mui/material';
1414
import { Error } from '@mui/icons-material';
15+
import GuestProjectsCard from '../../GuestProjectsPage/GuestProjectsCard';
1516

1617
const NoFeaturedProjectsDisplay: React.FC = () => {
1718
return (
@@ -51,7 +52,7 @@ const FeaturedProjects: React.FC = () => {
5152
{featuredProjects.length === 0 ? (
5253
<NoFeaturedProjectsDisplay />
5354
) : (
54-
featuredProjects.map((p) => <FeaturedProjectsCard key={wbsPipe(p.wbsNum)} project={p} />)
55+
featuredProjects.map((p) => <GuestProjectsCard project={p} />)
5556
)}
5657
</Stack>
5758
</ScrollablePageBlock>

0 commit comments

Comments
 (0)