Skip to content

Scheduling infrastructure for absolutely everyone.

Remove the back arrow (#5402)

GitStart10d3b5f1b9fa
diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx
index 15d0ef83a56..7185cd148a6 100644
--- a/apps/web/components/booking/pages/AvailabilityPage.tsx
+++ b/apps/web/components/booking/pages/AvailabilityPage.tsx
@@ -1,7 +1,6 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import { EventType } from "@prisma/client";
import * as Popover from "@radix-ui/react-popover";
-import { TFunction } from "next-i18next";
import { useRouter } from "next/router";
import { useReducer, useEffect, useMemo, useState } from "react";
import { Toaster } from "react-hot-toast";
@@ -19,7 +18,6 @@ import {
} from "@calcom/embed-core/embed-iframe";
import CustomBranding from "@calcom/lib/CustomBranding";
import classNames from "@calcom/lib/classNames";
-import { WEBSITE_URL } from "@calcom/lib/constants";
import getStripeAppData from "@calcom/lib/getStripeAppData";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import useTheme from "@calcom/lib/hooks/useTheme";
@@ -27,7 +25,6 @@ import notEmpty from "@calcom/lib/notEmpty";
import { getRecurringFreq } from "@calcom/lib/recurringStrings";
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
import { detectBrowserTimeFormat, setIs24hClockInLocalStorage, TimeFormat } from "@calcom/lib/timeFormat";
-import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
import { trpc } from "@calcom/trpc/react";
import { Icon, DatePicker } from "@calcom/ui";
@@ -48,23 +45,6 @@ import type { AvailabilityPageProps } from "../../../pages/[user]/[type]";
import type { DynamicAvailabilityPageProps } from "../../../pages/d/[link]/[slug]";
import type { AvailabilityTeamPageProps } from "../../../pages/team/[slug]/[type]";
-// Get router variables
-const GoBackToPreviousPage = ({ t }: { t: TFunction }) => {
- const router = useRouter();
- const path = router.asPath.split("/");
- path.pop(); // Remove the last item (where we currently are)
- path.shift(); // Removes first item e.g. if we were visitng "/teams/test/30mins" the array will new look like ["teams","test"]
- const slug = path.join("/");
- return (
- <div className="flex h-full flex-col justify-end">
- <button title={t("profile")} onClick={() => router.replace(`${WEBSITE_URL}/${slug}`)}>
- <Icon.FiArrowLeft className="dark:text-darkgray-600 h-4 w-4 text-black transition-opacity hover:cursor-pointer" />
- <p className="sr-only">Go Back</p>
- </button>
- </div>
- );
-};
-
const useSlots = ({
eventTypeId,
eventTypeSlug,
@@ -423,12 +403,6 @@ const AvailabilityPage = ({ profile, eventType, ...restProps }: Props) => {
{timezoneDropdown}
</BookingDescription>
- {!isEmbed && (
- <div className="mt-auto hidden md:block">
- <GoBackToPreviousPage t={t} />
- </div>
- )}
-
{/* Temporarily disabled - booking?.startTime && rescheduleUid && (
<div>
<p