Booking fixes attempt
parent
e3160027ea
commit
4212e6d619
|
@ -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 = [
|
||||||
|
|
|
@ -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;
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue