From 97dcb2a2a9e91b9e7f2d42bc81087ba533f26134 Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Thu, 8 Feb 2024 02:19:46 +0530 Subject: [PATCH] fix: add missing title (#13307) * add missing title * add * update * update * update * fix lint * Update AppsLayout.tsx * update * Update bookings-listing-view.tsx * update --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Keith Williams --- apps/web/app/future/bookings/[status]/page.tsx | 3 +-- apps/web/app/future/event-types/page.tsx | 4 +--- apps/web/app/future/insights/page.tsx | 4 +--- apps/web/app/future/teams/page.tsx | 4 +--- apps/web/app/future/workflows/page.tsx | 3 +-- .../apps/layouts/InstalledAppsLayout.tsx | 6 +++++- .../bookings/views/bookings-listing-view.tsx | 12 +++++++++--- .../event-types/views/event-types-listing-view.tsx | 9 ++++++--- apps/web/pages/apps/categories/[category].tsx | 2 ++ apps/web/pages/apps/categories/index.tsx | 7 ++++++- apps/web/pages/apps/index.tsx | 14 ++++++++++++-- apps/web/pages/availability/index.tsx | 12 ++++++------ apps/web/pages/bookings/[status].tsx | 4 ---- apps/web/pages/event-types/index.tsx | 3 --- apps/web/pages/insights/index.tsx | 13 ++++++++----- .../settings/my-account/out-of-office/index.tsx | 8 +++----- apps/web/pages/teams/index.tsx | 11 ++++++----- .../routing-forms/pages/forms/[...appPages].tsx | 6 +++++- packages/features/ee/workflows/pages/index.tsx | 13 ++++++------- packages/features/shell/Shell.tsx | 3 ++- 20 files changed, 81 insertions(+), 60 deletions(-) diff --git a/apps/web/app/future/bookings/[status]/page.tsx b/apps/web/app/future/bookings/[status]/page.tsx index 80b377b458..15f5630fa0 100644 --- a/apps/web/app/future/bookings/[status]/page.tsx +++ b/apps/web/app/future/bookings/[status]/page.tsx @@ -3,7 +3,6 @@ import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; import type { InferGetStaticPropsType } from "next"; -import { getLayout } from "@calcom/features/MainLayoutAppDir"; import { APP_NAME } from "@calcom/lib/constants"; import { validStatuses } from "~/bookings/lib/validStatuses"; @@ -23,6 +22,6 @@ export const generateStaticParams = async () => { return validStatuses.map((status) => ({ status })); }; -export default WithLayout({ getLayout, getData, Page })<"P">; +export default WithLayout({ getLayout: null, getData, Page })<"P">; export const dynamic = "force-static"; diff --git a/apps/web/app/future/event-types/page.tsx b/apps/web/app/future/event-types/page.tsx index 726680d07b..b277302dba 100644 --- a/apps/web/app/future/event-types/page.tsx +++ b/apps/web/app/future/event-types/page.tsx @@ -1,8 +1,6 @@ import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; -import { getLayout } from "@calcom/features/MainLayoutAppDir"; - import EventTypes from "~/event-types/views/event-types-listing-view"; export const generateMetadata = async () => @@ -11,4 +9,4 @@ export const generateMetadata = async () => (t) => t("event_types_page_subtitle") ); -export default WithLayout({ getLayout, Page: EventTypes })<"P">; +export default WithLayout({ getLayout: null, Page: EventTypes })<"P">; diff --git a/apps/web/app/future/insights/page.tsx b/apps/web/app/future/insights/page.tsx index 765ac9ab86..24f94e4f8e 100644 --- a/apps/web/app/future/insights/page.tsx +++ b/apps/web/app/future/insights/page.tsx @@ -3,8 +3,6 @@ import { withAppDirSsr } from "app/WithAppDirSsr"; import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; -import { getLayout } from "@calcom/features/MainLayoutAppDir"; - import { getServerSideProps } from "@lib/insights/getServerSideProps"; import { type inferSSRProps } from "@lib/types/inferSSRProps"; @@ -16,4 +14,4 @@ export const generateMetadata = async () => const getData = withAppDirSsr>(getServerSideProps); -export default WithLayout({ getLayout, getData, Page: LegacyPage }); +export default WithLayout({ getLayout: null, getData, Page: LegacyPage }); diff --git a/apps/web/app/future/teams/page.tsx b/apps/web/app/future/teams/page.tsx index 2145383bb8..793126c360 100644 --- a/apps/web/app/future/teams/page.tsx +++ b/apps/web/app/future/teams/page.tsx @@ -3,8 +3,6 @@ import { withAppDirSsr } from "app/WithAppDirSsr"; import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; -import { getLayout } from "@calcom/features/MainLayoutAppDir"; - import { getServerSideProps } from "@lib/teams/getServerSideProps"; export const generateMetadata = async () => @@ -13,4 +11,4 @@ export const generateMetadata = async () => (t) => t("create_manage_teams_collaborative") ); -export default WithLayout({ getData: withAppDirSsr(getServerSideProps), getLayout, Page })<"P">; +export default WithLayout({ getData: withAppDirSsr(getServerSideProps), getLayout: null, Page })<"P">; diff --git a/apps/web/app/future/workflows/page.tsx b/apps/web/app/future/workflows/page.tsx index 78ea4d910b..e53c797a9c 100644 --- a/apps/web/app/future/workflows/page.tsx +++ b/apps/web/app/future/workflows/page.tsx @@ -1,7 +1,6 @@ import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; -import { getLayout } from "@calcom/features/MainLayoutAppDir"; import LegacyPage from "@calcom/features/ee/workflows/pages/index"; export const generateMetadata = async () => @@ -10,4 +9,4 @@ export const generateMetadata = async () => (t) => t("workflows_to_automate_notifications") ); -export default WithLayout({ getLayout, Page: LegacyPage })<"P">; +export default WithLayout({ getLayout: null, Page: LegacyPage })<"P">; diff --git a/apps/web/components/apps/layouts/InstalledAppsLayout.tsx b/apps/web/components/apps/layouts/InstalledAppsLayout.tsx index 40b7f98ea1..4a42082d4c 100644 --- a/apps/web/components/apps/layouts/InstalledAppsLayout.tsx +++ b/apps/web/components/apps/layouts/InstalledAppsLayout.tsx @@ -9,7 +9,11 @@ export default function InstalledAppsLayout({ ...rest }: { children: React.ReactNode } & ComponentProps) { return ( - + {children} diff --git a/apps/web/modules/bookings/views/bookings-listing-view.tsx b/apps/web/modules/bookings/views/bookings-listing-view.tsx index b8adf4c3e3..df43e9cd49 100644 --- a/apps/web/modules/bookings/views/bookings-listing-view.tsx +++ b/apps/web/modules/bookings/views/bookings-listing-view.tsx @@ -10,7 +10,7 @@ import { FilterToggle } from "@calcom/features/bookings/components/FilterToggle" import { FiltersContainer } from "@calcom/features/bookings/components/FiltersContainer"; import type { filterQuerySchema } from "@calcom/features/bookings/lib/useFilterQuery"; import { useFilterQuery } from "@calcom/features/bookings/lib/useFilterQuery"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback"; import type { RouterOutputs } from "@calcom/trpc/react"; @@ -147,7 +147,13 @@ export default function Bookings() { const [animationParentRef] = useAutoAnimate(); return ( - +
@@ -247,6 +253,6 @@ export default function Bookings() {
-
+
); } diff --git a/apps/web/modules/event-types/views/event-types-listing-view.tsx b/apps/web/modules/event-types/views/event-types-listing-view.tsx index 0e9c6bcfb7..0000969f14 100644 --- a/apps/web/modules/event-types/views/event-types-listing-view.tsx +++ b/apps/web/modules/event-types/views/event-types-listing-view.tsx @@ -16,7 +16,7 @@ import CreateEventTypeDialog from "@calcom/features/eventtypes/components/Create import { DuplicateDialog } from "@calcom/features/eventtypes/components/DuplicateDialog"; import { TeamsFilter } from "@calcom/features/filters/components/TeamsFilter"; import { getTeamsFiltersFromQuery } from "@calcom/features/filters/lib/getTeamsFiltersFromQuery"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants"; import { CAL_URL } from "@calcom/lib/constants"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; @@ -948,7 +948,10 @@ const EventTypesPage: React.FC & { }, [orgBranding, user]); return ( -
- + ); }; diff --git a/apps/web/pages/apps/categories/[category].tsx b/apps/web/pages/apps/categories/[category].tsx index d491feba5f..d8e41dcf8c 100644 --- a/apps/web/pages/apps/categories/[category].tsx +++ b/apps/web/pages/apps/categories/[category].tsx @@ -26,6 +26,8 @@ export default function Apps({ apps }: PageProps) { diff --git a/apps/web/pages/apps/categories/index.tsx b/apps/web/pages/apps/categories/index.tsx index 3db426927c..de8563a9ec 100644 --- a/apps/web/pages/apps/categories/index.tsx +++ b/apps/web/pages/apps/categories/index.tsx @@ -16,7 +16,12 @@ export default function Apps({ categories }: Omit +
{ + return ( + + {page} + + ); +}; diff --git a/apps/web/pages/availability/index.tsx b/apps/web/pages/availability/index.tsx index 6465f3b5cb..72a952cc43 100644 --- a/apps/web/pages/availability/index.tsx +++ b/apps/web/pages/availability/index.tsx @@ -3,9 +3,8 @@ import Link from "next/link"; import { useRouter, usePathname } from "next/navigation"; import { useCallback } from "react"; -import { getLayout } from "@calcom/features/MainLayout"; import { NewScheduleButton, ScheduleListItem } from "@calcom/features/schedules"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { AvailabilitySliderTable } from "@calcom/features/timezone-buddy/components/AvailabilitySliderTable"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -167,9 +166,12 @@ export default function AvailabilityPage() { ); return (
- @@ -189,11 +191,9 @@ export default function AvailabilityPage() {
}> {searchParams?.get("type") === "team" ? : } - +
); } -AvailabilityPage.getLayout = getLayout; - AvailabilityPage.PageWrapper = PageWrapper; diff --git a/apps/web/pages/bookings/[status].tsx b/apps/web/pages/bookings/[status].tsx index 3e23057ee2..49b006a57a 100644 --- a/apps/web/pages/bookings/[status].tsx +++ b/apps/web/pages/bookings/[status].tsx @@ -1,7 +1,5 @@ import type { GetStaticPaths } from "next"; -import { getLayout } from "@calcom/features/MainLayout"; - import PageWrapper from "@components/PageWrapper"; import { validStatuses } from "~/bookings/lib/validStatuses"; @@ -12,11 +10,9 @@ export { getStaticProps } from "~/bookings/views/bookings-listing-view.getStatic const BookingsListingPage = new Proxy<{ (): JSX.Element; PageWrapper?: typeof PageWrapper; - getLayout?: typeof getLayout; }>(BookingsListingView, {}); BookingsListingPage.PageWrapper = PageWrapper; -BookingsListingPage.getLayout = getLayout; export const getStaticPaths: GetStaticPaths = () => { return { diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx index 7eafcc9e7a..25af9e4ea4 100644 --- a/apps/web/pages/event-types/index.tsx +++ b/apps/web/pages/event-types/index.tsx @@ -1,12 +1,9 @@ -import { getLayout } from "@calcom/features/MainLayout"; - import PageWrapper from "@components/PageWrapper"; import EventTypesPage from "~/event-types/views/event-types-listing-view"; export { getServerSideProps } from "@lib/event-types/getServerSideProps"; -EventTypesPage.getLayout = getLayout; EventTypesPage.PageWrapper = PageWrapper; export default EventTypesPage; diff --git a/apps/web/pages/insights/index.tsx b/apps/web/pages/insights/index.tsx index 33ecb05082..e81fec9f2a 100644 --- a/apps/web/pages/insights/index.tsx +++ b/apps/web/pages/insights/index.tsx @@ -1,6 +1,5 @@ "use client"; -import { getLayout } from "@calcom/features/MainLayout"; import { AverageEventDurationChart, BookingKPICards, @@ -11,7 +10,7 @@ import { } from "@calcom/features/insights/components"; import { FiltersProvider } from "@calcom/features/insights/context/FiltersProvider"; import { Filters } from "@calcom/features/insights/filters"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { UpgradeTip } from "@calcom/features/tips"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -47,7 +46,12 @@ export default function InsightsPage() { return (
- + )} - +
); } InsightsPage.PageWrapper = PageWrapper; -InsightsPage.getLayout = getLayout; export { getServerSideProps }; diff --git a/apps/web/pages/settings/my-account/out-of-office/index.tsx b/apps/web/pages/settings/my-account/out-of-office/index.tsx index 7912d02fe8..19a93dd51d 100644 --- a/apps/web/pages/settings/my-account/out-of-office/index.tsx +++ b/apps/web/pages/settings/my-account/out-of-office/index.tsx @@ -4,8 +4,7 @@ import { Controller, useForm, useFormState } from "react-hook-form"; import dayjs from "@calcom/dayjs"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { useHasTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; @@ -245,15 +244,14 @@ const OutOfOfficePage = () => { return ( <> - + - +
); }; -OutOfOfficePage.getLayout = getLayout; OutOfOfficePage.PageWrapper = PageWrapper; export default OutOfOfficePage; diff --git a/apps/web/pages/teams/index.tsx b/apps/web/pages/teams/index.tsx index 38c06ff35a..0d2d861a2f 100644 --- a/apps/web/pages/teams/index.tsx +++ b/apps/web/pages/teams/index.tsx @@ -1,8 +1,7 @@ "use client"; -import { getLayout } from "@calcom/features/MainLayout"; import { TeamsListing } from "@calcom/features/ee/teams/components"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; @@ -18,8 +17,11 @@ function Teams() { const [user] = trpc.viewer.me.useSuspenseQuery(); return ( - - +
); } Teams.requiresLicense = false; Teams.PageWrapper = PageWrapper; -Teams.getLayout = getLayout; export default Teams; diff --git a/packages/app-store/routing-forms/pages/forms/[...appPages].tsx b/packages/app-store/routing-forms/pages/forms/[...appPages].tsx index 00645ff538..92831e8d1b 100644 --- a/packages/app-store/routing-forms/pages/forms/[...appPages].tsx +++ b/packages/app-store/routing-forms/pages/forms/[...appPages].tsx @@ -363,7 +363,11 @@ export default function RoutingForms({ RoutingForms.getLayout = (page: React.ReactElement) => { return ( - + {page} ); diff --git a/packages/features/ee/workflows/pages/index.tsx b/packages/features/ee/workflows/pages/index.tsx index efc8ad5f57..f666161c8c 100644 --- a/packages/features/ee/workflows/pages/index.tsx +++ b/packages/features/ee/workflows/pages/index.tsx @@ -5,8 +5,7 @@ import { useRouter } from "next/navigation"; import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; -import { getLayout } from "@calcom/features/MainLayout"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { classNames } from "@calcom/lib"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -52,10 +51,12 @@ function WorkflowsPage() { }); return ( - - + ); } @@ -222,6 +223,4 @@ const Filter = (props: { ); }; -WorkflowsPage.getLayout = getLayout; - export default WorkflowsPage; diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index 32f84d2800..07c9b27a69 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -245,7 +245,7 @@ const Layout = (props: LayoutProps) => { {!props.withoutSeo && ( )}
@@ -302,6 +302,7 @@ type DrawerState = [isOpen: boolean, setDrawerOpen: Dispatch