Skip to content

Scheduling infrastructure for absolutely everyone.

fix redirect to upcoming booking (#3129)

Carina Wollendorferd7cd6e011e7c
diff --git a/apps/web/pages/cancel/success.tsx b/apps/web/pages/cancel/success.tsx
index 34c7d47be51..2cb78d65509 100644
--- a/apps/web/pages/cancel/success.tsx
+++ b/apps/web/pages/cancel/success.tsx
@@ -15,6 +15,7 @@ export default function CancelSuccess() {
const { title, name, eventPage, recurring } = router.query;
let team: string | string[] | number | undefined = router.query.team;
const { data: session, status } = useSession();
+ const isRecurringEvent = recurring === "true" ? true : false;
const loading = status === "loading";
// If team param passed wrongly just assume it be a non team case.
if (team instanceof Array || typeof team === "undefined") {
@@ -63,7 +64,7 @@ export default function CancelSuccess() {
{!loading && session?.user && (
<Button
data-testid="back-to-bookings"
- href={recurring !== "" ? "/bookings/recurring" : "/bookings"}
+ href={isRecurringEvent ? "/bookings/recurring" : "/bookings"}
StartIcon={ArrowLeftIcon}>
{t("back_to_bookings")}
</Button>