Skip to content

Commit

Permalink
Add mobile view for upcoming commitments (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinToft authored Aug 22, 2024
1 parent 27819ed commit 1b13339
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions frontend/src/pages/UpcomingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const UpcomingCard = ({ event }: { event: UpcomingEvent }) => {
return (
<div
style={{
width: "55%",
maxWidth: "800px",
}}
>
{currentlyEditingMealRequestId ? (
Expand All @@ -193,7 +193,11 @@ export const UpcomingCard = ({ event }: { event: UpcomingEvent }) => {
""
)}
<Card padding={3} variant="outline">
<HStack dir="row">
<Flex
direction={["column", "row"]}
justifyContent="space-around"
alignItems="center"
>
<VStack padding={10}>
<Text fontSize="md">
{
Expand Down Expand Up @@ -274,7 +278,7 @@ export const UpcomingCard = ({ event }: { event: UpcomingEvent }) => {
</VStack>
</HStack>
</VStack>
</HStack>
</Flex>
</Card>
</div>
);
Expand Down Expand Up @@ -461,15 +465,6 @@ const UpcomingPage = (): React.ReactElement => {
{tabSelected === 0 ? "Upcoming" : "Completed"} Donations
</Text>

<Text
fontFamily="Inter"
fontWeight="400"
fontSize={["12px", "16px"]}
pb="10px"
>
My {tabSelected === 0 ? "upcoming" : "completed"} meal donations
</Text>

{
// Not entirely sure why this was here...
/* <Flex
Expand Down Expand Up @@ -547,13 +542,11 @@ const UpcomingPage = (): React.ReactElement => {
)}
{!getUpcomingMealRequestsLoading && (
<>
{isWebView && (
<Stack direction="column">
{upcomingMealRequests?.map((event) => (
<UpcomingCard event={event} key={event.id} />
))}
</Stack>
)}
<Stack direction="column">
{upcomingMealRequests?.map((event) => (
<UpcomingCard event={event} key={event.id} />
))}
</Stack>
<HStack>
<Button
leftIcon={<ChevronLeftIcon />}
Expand Down

0 comments on commit 1b13339

Please sign in to comment.