Booking fixes attempt

pull/3545/head
zomars 2022-07-26 17:11:37 -06:00
parent e3160027ea
commit 4212e6d619
3 changed files with 4 additions and 25 deletions

View File

@ -125,12 +125,9 @@ const Layout = ({
}: LayoutProps & { status: SessionContextValue["status"]; plan?: UserPlan; isLoading: boolean }) => { }: LayoutProps & { status: SessionContextValue["status"]; plan?: UserPlan; isLoading: boolean }) => {
const isEmbed = useIsEmbed(); const isEmbed = useIsEmbed();
const router = useRouter(); const router = useRouter();
const { data: routingForms } = trpc.useQuery([ const { data: routingForms } = trpc.useQuery(["viewer.appById", { appId: "routing_forms" }], {
"viewer.appById", enabled: status === "authenticated",
{ });
appId: "routing_forms",
},
]);
const { t } = useLocale(); const { t } = useLocale();
const navigation = [ const navigation = [

View File

@ -1,18 +0,0 @@
import { NextPageContext } from "next";
import { getSession } from "@lib/auth";
function RedirectPage() {
return null;
}
export async function getServerSideProps(context: NextPageContext) {
const session = await getSession(context);
if (!session?.user?.id) {
return { redirect: { permanent: false, destination: "/auth/login" } };
}
return { redirect: { permanent: false, destination: "/bookings/upcoming" } };
}
export default RedirectPage;

View File

@ -1,6 +1,6 @@
import { z } from "zod"; import { z } from "zod";
import { LocationType } from "@calcom/core/location"; import { LocationType } from "@calcom/app-store/locations";
import dayjs from "@calcom/dayjs"; import dayjs from "@calcom/dayjs";
import { slugify } from "@calcom/lib/slugify"; import { slugify } from "@calcom/lib/slugify";