From bcb28356487b3a18ca29694eb6ed4725652cc7bc Mon Sep 17 00:00:00 2001 From: joshsny Date: Thu, 12 Aug 2021 12:23:10 +0200 Subject: [PATCH] fixed bug when eventType does not exist for booking --- pages/cancel/[uid].tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/cancel/[uid].tsx b/pages/cancel/[uid].tsx index 2e9d1fa5f7..2d661e4f08 100644 --- a/pages/cancel/[uid].tsx +++ b/pages/cancel/[uid].tsx @@ -1,4 +1,4 @@ -import { CalendarIcon, ClockIcon, XIcon } from "@heroicons/react/solid"; +import { CalendarIcon, XIcon } from "@heroicons/react/solid"; import dayjs from "dayjs"; import isBetween from "dayjs/plugin/isBetween"; import isSameOrBefore from "dayjs/plugin/isSameOrBefore"; @@ -46,7 +46,7 @@ export default function Type(props) { }); if (res.status >= 200 && res.status < 300) { - router.push("/cancel/success?user=" + props.user.username + "&title=" + props.eventType.title); + router.push("/cancel/success?user=" + props.user.username + "&title=" + props.booking.title); } else { setLoading(false); setError("An error with status code " + res.status + " occurred. Please try again later."); @@ -101,10 +101,6 @@ export default function Type(props) {

{props.booking.title}

-

- - {props.eventType.length} minutes -

{dayjs