Skip to content

Commit 61e7272

Browse files
Move donation warning text to meal donation form
1 parent dde2729 commit 61e7272

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

frontend/src/components/asp/requests/SchedulingFormReviewAndSubmit.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,6 @@ const SchedulingFormReviewAndSubmit: React.FunctionComponent<SchedulingFormRevie
329329
</Flex>
330330
</Flex>
331331
</GridItem>
332-
<GridItem colSpan={{ base: 1, md: 3 }}>
333-
<Text color="gray.600" fontStyle="italic">
334-
Please note that once you press submit, you will need to contact
335-
administrators in order to cancel the donation.
336-
</Text>
337-
</GridItem>
338332
{/* Next button that is right aligned */}
339333
<GridItem
340334
colSpan={{ base: 1, md: 3 }}

frontend/src/components/meal_donor/donation_form/MealDonationFormReviewAndSubmit.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import { gql, useApolloClient, useMutation } from "@apollo/client";
22
import {
3-
Box,
43
Button,
54
Divider,
65
Flex,
76
FormControl,
87
FormLabel,
98
Grid,
109
GridItem,
11-
Input,
12-
Select,
1310
SimpleGrid,
1411
Spacer,
1512
Spinner,
@@ -19,28 +16,23 @@ import {
1916
Tbody,
2017
Td,
2118
Text,
22-
Textarea,
2319
Th,
2420
Thead,
2521
Tr,
2622
useToast,
2723
} from "@chakra-ui/react";
2824
import React, { useContext, useState } from "react";
29-
import { Value } from "react-multi-date-picker";
3025
import { useNavigate } from "react-router-dom";
3126

3227
import MealDeliveryDetails from "./MealDeliveryDetails";
3328

34-
3529
import * as Routes from "../../../constants/Routes";
36-
import { MEAL_DONOR_DASHBOARD_PAGE } from "../../../constants/Routes";
3730
import AuthContext from "../../../contexts/AuthContext";
3831
import { MealRequest } from "../../../types/MealRequestTypes";
3932
import { Contact, OnsiteContact } from "../../../types/UserTypes";
4033
import { logPossibleGraphQLError } from "../../../utils/GraphQLUtils";
4134
import { useGetDefaultPageForUser } from "../../../utils/useGetDefaultPageForUser";
4235
import useIsMealDonor from "../../../utils/useIsMealDonor";
43-
import OnsiteContactSection from "../../common/OnsiteContactSection";
4436

4537
// Create the GraphQL mutation
4638
const COMMIT_TO_MEAL_REQUEST = gql`
@@ -132,13 +124,12 @@ const MealDonationFormReviewAndSubmit: React.FunctionComponent<MealDonationFormR
132124
});
133125

134126
if (isMealDonor) {
135-
apolloClient.cache.evict({ fieldName: "getMealRequestsByRequestorId" });
127+
apolloClient.cache.evict({
128+
fieldName: "getMealRequestsByRequestorId",
129+
});
136130
apolloClient.cache.evict({ fieldName: "getMealRequestsByDonorId" });
137-
navigate(
138-
`${Routes.MEAL_DONOR_CONFIRMATION_PAGE}?aspId=${aspId}`,
139-
);
140-
}
141-
else {
131+
navigate(`${Routes.MEAL_DONOR_CONFIRMATION_PAGE}?aspId=${aspId}`);
132+
} else {
142133
navigate(defaultPage);
143134
}
144135
}
@@ -171,7 +162,15 @@ const MealDonationFormReviewAndSubmit: React.FunctionComponent<MealDonationFormR
171162
<Text fontSize="2xl" as="b">
172163
Step 3
173164
</Text>
174-
165+
<Text
166+
color="gray.600"
167+
fontStyle="italic"
168+
fontSize="xs"
169+
marginY="1rem"
170+
>
171+
Please note that once you press submit, you will need to contact
172+
the administrators to cancel the donation.
173+
</Text>
175174
<FormControl>
176175
<FormLabel variant="form-label-bold">
177176
Primary Contact Name

0 commit comments

Comments
 (0)