perf: create (use-page-wrapper) route group and replace WithLayout from /bookings/[status] page + 8 low-risk single pages (#18737)

* add a layoutfile to use-page-wrapper route group

* refactor and move bookings status page to route group

* improve logic in pagesAndRewritePaths

* fix

* add use client directive

* chore: remove WithLayout from 8 low-risk single pages (#18745)

* move /403 and /500

* move /auth/error

* move /connect-and-join

* move /enterprise

* move /maintenance

* move /more

* move /upgrade

* pass dehydratedState in layout
This commit is contained in:
Benny Joo authored and GitHub committed 2025-01-22 12:52:58 -05:00
1 parent d1134c8560
commit f0d1c92e99
19 files changed
+59 -45

No files matched your search

@@ -7,7 +7,6 @@ import {
getSortedRowModel,
createColumnHelper,
} from "@tanstack/react-table";
import type { ReactElement } from "react";
import { useMemo, useState } from "react";
import type { z } from "zod";
@@ -18,7 +17,6 @@ import { FiltersContainer } from "@calcom/features/bookings/components/FiltersCo
import type { filterQuerySchema } from "@calcom/features/bookings/lib/useFilterQuery";
import { useFilterQuery } from "@calcom/features/bookings/lib/useFilterQuery";
import { DataTableProvider, DataTableWrapper } from "@calcom/features/data-table";
import Shell from "@calcom/features/shell/Shell";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
@@ -290,21 +288,3 @@ function BookingsContent({ status }: BookingsProps) {
</div>
);
}
function BookingsStatusLayout({ children }: { children: React.ReactNode }) {
const { t } = useLocale();
return (
<Shell
withoutMain={false}
withoutSeo={true}
hideHeadingOnMobile
heading={t("bookings")}
subtitle={t("bookings_description")}
title={t("bookings")}
description={t("bookings_description")}>
{children}
</Shell>
);
}
export const getLayout = (page: ReactElement) => <BookingsStatusLayout>{page}</BookingsStatusLayout>;