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

FIX(): the whole area of the button is now clickable #61

Merged
merged 1 commit into from
Aug 16, 2023
Merged
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
24 changes: 14 additions & 10 deletions src/routes/FoodPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,19 @@ export default function FoodPage() {
}
};

const GridBox = styled(Box)(() => ({
width: "24%",
const GridBox = styled(Box)(({ theme }) => ({
width: 80,
padding: 10,
aspectRatio: 2,
borderRadius: ".25em",
display: "flex",
justifyContent: "center",
alignItems: "center",
fontFamily: "Sans",
[theme.breakpoints.up('md')]: {
width: 200,
fontSize: '1.125rem',
fontWeight: '400'
},
}));

const ImgBox = styled(Box)(() => ({
Expand All @@ -71,18 +77,17 @@ export default function FoodPage() {
minWidth: 100,
aspectRatio: 1,
mx: "0.5em",

}));
}));

const renderMonths = () => {
return months.map((month) => {
let userNumber = Number(month) + 1;
return (
<GridBox sx={{ ...monthColor(month), mb: 1 }}>
<Link to={`/month/${userNumber}`}>
<Typography>{t(`month_${month}`)}</Typography>
<GridBox sx={{ ...monthColor(month), m: 1 }}>
<div >{t(`month_${month}`)}</div>
</GridBox>
</Link>
</GridBox>
);
});
};
Expand Down Expand Up @@ -125,12 +130,11 @@ export default function FoodPage() {
</Stack>
</Stack>
<Typography
variant="h6"
variant="h5"
textAlign="center"
mt={3}
sx={{ fontWeight: 700 }}
color="secondary.dark"

>
{t("FoodPage_monthsInSeason")}
</Typography>
Expand Down