From 8e51aff35687a8230cada3456bae5d1615fbacb5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Dec 2024 09:55:50 +0000 Subject: [PATCH] Format code with Prettier --- .../hooks/api/useAttendanceUpdateMutation.ts | 2 +- web/src/screens/CheckoutScreen.tsx | 46 +++++++++++-------- web/src/types/types.ts | 1 - 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/web/src/hooks/api/useAttendanceUpdateMutation.ts b/web/src/hooks/api/useAttendanceUpdateMutation.ts index bc42269..a2243fa 100644 --- a/web/src/hooks/api/useAttendanceUpdateMutation.ts +++ b/web/src/hooks/api/useAttendanceUpdateMutation.ts @@ -1,5 +1,5 @@ import { useMutation } from "@tanstack/react-query"; -import { postAttendanceUpdate} from "../../api/apiRequests"; +import { postAttendanceUpdate } from "../../api/apiRequests"; import { AttendanceReturn } from "../../types/types"; export const useUpdateAttendance = () => { diff --git a/web/src/screens/CheckoutScreen.tsx b/web/src/screens/CheckoutScreen.tsx index b57a56b..75fc2cb 100644 --- a/web/src/screens/CheckoutScreen.tsx +++ b/web/src/screens/CheckoutScreen.tsx @@ -19,7 +19,7 @@ let bodyData: { priceId: string; userTicketId: number }; export default function CheckoutScreen() { const { data, mutateAsync, status } = useEventOrMembershipCheckoutSecret(); const location = useLocation(); - const navigate = useNavigate() + const navigate = useNavigate(); // ensure data required for checkout is here try { @@ -59,26 +59,32 @@ export default function CheckoutScreen() { return ; } - if (status === "error" || data?.clientSecret=== undefined){ - return (
-
-

Checkout

+ if (status === "error" || data?.clientSecret === undefined) { + return ( +
+
+

Checkout

+
+
+

+ Sorry an error occurred, please try again +
+ This could be caused by ticket being sold out, or some other error +

+
+
+ +
-
-

Sorry an error occurred, please try again
This could be caused by ticket being sold out, or some other error

- -
- -
-
) + ); } if (status === "success") { diff --git a/web/src/types/types.ts b/web/src/types/types.ts index a9dc12a..2d5f571 100644 --- a/web/src/types/types.ts +++ b/web/src/types/types.ts @@ -139,7 +139,6 @@ export interface EventOrMembershipReturn { clientSecret: string; } - export interface stripeSessionStatus { customer_email: string; status: string;