perf: slim down middleware matcher (#20735)

* wip

* wip

* refactor

* add pathname

* fix

* fix: manually construct pathname for metadata functions

Co-Authored-By: benny@cal.com <benny@cal.com>

* fix: add pathname parameter to all metadata functions

Co-Authored-By: benny@cal.com <benny@cal.com>

* fix: add pathname parameter to remaining metadata functions

Co-Authored-By: benny@cal.com <benny@cal.com>

* fix

* fix

* fix type checks

* Refactor

* fix

* fix

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: benny@cal.com <benny@cal.com>
This commit is contained in:
Benny Joo
2025-04-17 19:55:01 -07:00
committed by GitHub
co-authored by benny@cal.com Devin AI
parent 95c48ac805
commit 69efc26f36
123 changed files with 773 additions and 447 deletions
@@ -20,6 +20,7 @@ const getData = withAppDirSsr<OrgPageProps>(getServerSideProps);
export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const legacyCtx = buildLegacyCtx(await headers(), await cookies(), await params, await searchParams);
const props = await getData(legacyCtx);
const decodedParams = decodeParams(await params);
if ((props as TeamPageProps)?.team) {
const { team, markdownStrippedBio, isSEOIndexable, currentOrgDomain } = props as TeamPageProps;
@@ -30,7 +31,6 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
image: getOrgOrTeamAvatar(team),
},
};
const decodedParams = decodeParams(await params);
return {
...(await generateMeetingMetadata(
meeting,
@@ -67,7 +67,8 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
() => profile.name,
() => markdownStrippedBio,
false,
getOrgFullOrigin(entity.orgSlug ?? null)
getOrgFullOrigin(entity.orgSlug ?? null),
`/${decodedParams.user}`
)),
robots: {
index: allowSEOIndexing,
@@ -12,7 +12,10 @@ import { ShellMainAppDir } from "../ShellMainAppDir";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("availability"),
(t) => t("configure_availability")
(t) => t("configure_availability"),
undefined,
undefined,
"/availability"
);
};
@@ -11,10 +11,13 @@ const querySchema = z.object({
status: z.enum(validStatuses),
});
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ status: string }> }) =>
await _generateMetadata(
(t) => t("bookings"),
(t) => t("bookings_description")
(t) => t("bookings_description"),
undefined,
undefined,
`/bookings/${(await params).status}`
);
const Page = async ({ params }: PageProps) => {
@@ -16,7 +16,10 @@ import EventTypes, { EventTypesCTA } from "~/event-types/views/event-types-listi
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("event_types_page_title"),
(t) => t("event_types_page_subtitle")
(t) => t("event_types_page_subtitle"),
undefined,
undefined,
"/event-types"
);
const Page = async ({ params, searchParams }: PageProps) => {
@@ -13,7 +13,10 @@ import TeamsView, { TeamsCTA } from "~/teams/teams-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("teams"),
(t) => t("create_manage_teams_collaborative")
(t) => t("create_manage_teams_collaborative"),
undefined,
undefined,
"/teams"
);
const ServerPage = async ({ searchParams: _searchParams }: ServerPageProps) => {
+4 -1
View File
@@ -6,7 +6,10 @@ import { Button } from "@calcom/ui/components/button";
export const generateMetadata = () =>
_generateMetadata(
(t) => `${t("access_denied")} | ${APP_NAME}`,
() => ""
() => "",
undefined,
undefined,
"/403"
);
async function Error403() {
+4 -1
View File
@@ -8,7 +8,10 @@ import CopyButton from "./copy-button";
export const generateMetadata = () =>
_generateMetadata(
(t) => `${t("something_unexpected_occurred")} | ${APP_NAME}`,
() => ""
() => "",
undefined,
undefined,
"/500"
);
async function Error500({ searchParams }: { searchParams: { error?: string } }) {
@@ -28,7 +28,10 @@ export const generateMetadata = async ({ params }: _PageProps) => {
return await generateAppMetadata(
{ slug: logo, name, description },
() => name,
() => description
() => description,
undefined,
undefined,
`/apps/${p.data.slug}`
);
};
@@ -13,7 +13,10 @@ export const generateMetadata = async ({ params: _params }: ServerPageProps) =>
const params = await _params;
const metadata = await _generateMetadata(
() => `${params.slug}`,
() => ""
() => "",
undefined,
undefined,
`/apps/${params.slug}/setup`
);
return {
...metadata,
@@ -3,7 +3,10 @@ import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("app_store"),
(t) => t("app_store_description")
(t) => t("app_store_description"),
undefined,
undefined,
"/apps/categories"
);
};
@@ -13,9 +13,14 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const legacyCtx = buildLegacyCtx(await headers(), await cookies(), await params, await searchParams);
const { appMetadata } = await getData(legacyCtx);
const stepParam = (await params).step;
const step = stepParam && Array.isArray(stepParam) ? stepParam.join("/") : "";
return await _generateMetadata(
(t) => `${t("install")} ${appMetadata?.name ?? ""}`,
() => ""
() => "",
undefined,
undefined,
`/apps/installation${step ? `/${step}` : ""}`
);
};
@@ -11,10 +11,13 @@ const querySchema = z.object({
category: z.nativeEnum(AppCategories),
});
export const generateMetadata = async () => {
export const generateMetadata = async ({ params }: { params: Promise<{ category: string }> }) => {
return await _generateMetadata(
(t) => t("installed_apps"),
(t) => t("manage_your_connected_apps")
(t) => t("manage_your_connected_apps"),
undefined,
undefined,
`/apps/installed/${(await params).category}`
);
};
@@ -11,7 +11,10 @@ import AppsPage from "~/apps/apps-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("app_store"),
(t) => t("app_store_description")
(t) => t("app_store_description"),
undefined,
undefined,
"/apps"
);
};
@@ -25,7 +25,10 @@ export const generateMetadata = async ({ params }: { params: Promise<{ pages: st
return await _generateMetadata(
// TODO: Need to show the actual form name instead of "Form"
(t) => (mainPage === "routing-link" ? `Form | Cal.com Forms` : `${t("routing_forms")} | Cal.com Forms`),
() => ""
() => "",
undefined,
undefined,
`/apps/routing-forms/${(await params).pages.join("/")}`
);
};
@@ -11,7 +11,10 @@ import AuthContainer from "@components/ui/AuthContainer";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("error"),
() => ""
() => "",
undefined,
undefined,
"/auth/error"
);
};
@@ -10,10 +10,13 @@ import { getServerSideProps } from "@server/lib/auth/forgot-password/[id]/getSer
import type { PageProps as ClientPageProps } from "~/auth/forgot-password/[id]/forgot-password-single-view";
import SetNewUserPassword from "~/auth/forgot-password/[id]/forgot-password-single-view";
export const generateMetadata = async () => {
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) => {
return await _generateMetadata(
(t) => t("reset_password"),
(t) => t("change_your_password")
(t) => t("change_your_password"),
undefined,
undefined,
`/auth/forgot-password/${(await params).id}`
);
};
@@ -13,7 +13,10 @@ import ForgotPassword from "~/auth/forgot-password/forgot-password-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("forgot_password"),
(t) => t("request_password_reset")
(t) => t("request_password_reset"),
undefined,
undefined,
"/auth/forgot-password"
);
};
@@ -13,7 +13,10 @@ import Login from "~/auth/login-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("login"),
(t) => t("login")
(t) => t("login"),
undefined,
undefined,
"/auth/login"
);
};
@@ -9,7 +9,10 @@ import Logout from "~/auth/logout-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("logged_out"),
(t) => t("youve_been_logged_out")
(t) => t("youve_been_logged_out"),
undefined,
undefined,
"/auth/logout"
);
};
@@ -5,7 +5,10 @@ import Page from "~/auth/oauth2/authorize-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("authorize"),
() => ""
() => "",
undefined,
undefined,
"/auth/oauth2/authorize"
);
};
@@ -5,7 +5,10 @@ import Page from "~/auth/platform/authorize-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("authorize"),
() => ""
() => "",
undefined,
undefined,
"/auth/platform/authorize"
);
};
@@ -13,7 +13,10 @@ import type { PageProps as ClientPageProps } from "~/auth/setup-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("setup"),
(t) => t("setup_description")
(t) => t("setup_description"),
undefined,
undefined,
"/auth/setup"
);
};
@@ -13,7 +13,10 @@ import VerifyEmailChange from "~/auth/verify-email-change-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("verify_email_change"),
() => ""
() => "",
undefined,
undefined,
"/auth/verify-email-change"
);
};
@@ -5,7 +5,10 @@ import VerifyEmailPage from "~/auth/verify-email-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("verify_email_button"),
() => ""
() => "",
undefined,
undefined,
"/auth/verify-email"
);
};
@@ -26,7 +26,10 @@ export const generateMetadata = async ({ params, searchParams }: _PageProps) =>
return await _generateMetadata(
() =>
hasPaymentFailed ? "Your payment failed" : sessionId ? "Payment successful!" : `Verify your email`,
() => ""
() => "",
undefined,
undefined,
"/auth/verify"
);
};
@@ -38,7 +38,10 @@ export const generateMetadata = async ({ params }: PageProps) => {
return await _generateMetadata(
(t) => (schedule.name ? `${schedule.name} | ${t("availability")}` : t("availability")),
() => ""
() => "",
undefined,
undefined,
`/availability/${parsed.data.schedule}`
);
};
@@ -5,7 +5,10 @@ import Troubleshoot from "~/availability/troubleshoot/troubleshoot-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("troubleshoot"),
(t) => t("troubleshoot_availability")
(t) => t("troubleshoot_availability"),
undefined,
undefined,
"/availability/troubleshoot"
);
};
@@ -26,7 +26,8 @@ export const generateMetadata = async ({ params, searchParams }: _PageProps) =>
(t) =>
t(`booking_${needsConfirmation ? "submitted" : "confirmed"}${recurringBookings ? "_recurring" : ""}`),
false,
getOrgFullOrigin(orgSlug)
getOrgFullOrigin(orgSlug),
`/booking/${(await params).uid}`
);
};
@@ -5,7 +5,10 @@ import BookingDryRunSuccessView from "~/bookings/views/booking-dry-run-success-v
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("booking_dry_run_successful"),
(t) => t("booking_dry_run_successful_description")
(t) => t("booking_dry_run_successful_description"),
undefined,
undefined,
"/booking/dry-run-successful"
);
};
@@ -7,7 +7,10 @@ import LegacyPage from "~/connect-and-join/connect-and-join-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("connect_and_join"),
() => ""
() => "",
undefined,
undefined,
"/connect-and-join"
);
};
@@ -10,7 +10,8 @@ import { type PageProps } from "@lib/d/[link]/[slug]/getServerSideProps";
import Type from "~/d/[link]/d-type-view";
export const generateMetadata = async ({ params, searchParams }: _PageProps) => {
const legacyCtx = buildLegacyCtx(await headers(), await cookies(), await params, await searchParams);
const _params = await params;
const legacyCtx = buildLegacyCtx(await headers(), await cookies(), _params, await searchParams);
const pageProps = await getData(legacyCtx);
const { booking, eventData, isBrandingHidden } = pageProps;
@@ -21,7 +22,9 @@ export const generateMetadata = async ({ params, searchParams }: _PageProps) =>
return await _generateMetadata(
(t) => `${rescheduleUid && !!booking ? t("reschedule") : ""} ${title} | ${profileName}`,
(t) => `${rescheduleUid ? t("reschedule") : ""} ${title}`,
isBrandingHidden
isBrandingHidden,
undefined,
`/d/${_params.link}/${_params.slug}`
);
};
@@ -5,7 +5,10 @@ import EnterprisePage from "@components/EnterprisePage";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("create_your_org"),
(t) => t("create_your_org_description")
(t) => t("create_your_org_description"),
undefined,
undefined,
"/enterprise"
);
const ServerPageWrapper = async () => {
@@ -24,7 +24,10 @@ export const generateMetadata = async ({ params }: _PageProps) => {
if (!parsed.success) {
return await _generateMetadata(
(t) => `${t("event_type")}`,
() => ""
() => "",
undefined,
undefined,
"/event-types"
);
}
@@ -34,7 +37,10 @@ export const generateMetadata = async ({ params }: _PageProps) => {
return await _generateMetadata(
(t) => (data?.title ? `${data.title} | ${t("event_type")}` : `${t("event_type")}`),
() => ""
() => "",
undefined,
undefined,
`/event-types/${parsed.data.type}`
);
};
@@ -11,11 +11,15 @@ import { getServerSideProps } from "@lib/getting-started/[[...step]]/getServerSi
import type { PageProps as ClientPageProps } from "~/getting-started/[[...step]]/onboarding-view";
import Page from "~/getting-started/[[...step]]/onboarding-view";
export const generateMetadata = async () => {
export const generateMetadata = async ({ params }: ServerPageProps) => {
const stepParam = (await params).step;
const step = stepParam && Array.isArray(stepParam) ? stepParam.join("/") : "";
return await _generateMetadata(
(t) => `${APP_NAME} - ${t("getting_started")}`,
() => "",
true
true,
undefined,
`/getting-started${step ? `/${step}` : ""}`
);
};
@@ -8,7 +8,10 @@ import InsightsPage from "~/insights/insights-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("insights"),
(t) => t("insights_subtitle")
(t) => t("insights_subtitle"),
undefined,
undefined,
"/insights"
);
export default async function Page() {
@@ -8,7 +8,10 @@ import InsightsVirtualQueuesPage from "~/insights/insights-virtual-queues-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("insights"),
(t) => t("insights_subtitle")
(t) => t("insights_subtitle"),
undefined,
undefined,
"/insights/router-position"
);
export default async function Page() {
@@ -8,7 +8,10 @@ import InsightsRoutingPage from "~/insights/insights-routing-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("insights"),
(t) => t("insights_subtitle")
(t) => t("insights_subtitle"),
undefined,
undefined,
"/insights/routing"
);
export default async function Page() {
@@ -7,7 +7,10 @@ import LegacyPage from "~/maintenance/maintenance-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("under_maintenance"),
(t) => t("under_maintenance_description", { appName: APP_NAME })
(t) => t("under_maintenance_description", { appName: APP_NAME }),
undefined,
undefined,
"/maintenance"
);
};
@@ -5,7 +5,10 @@ import Page from "~/more/more-page-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("more"),
() => ""
() => "",
undefined,
undefined,
"/more"
);
};
@@ -16,7 +16,10 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const eventName = props.booking.title;
return await _generateMetadata(
(t) => `${t("payment")} | ${eventName} | ${APP_NAME}`,
() => ""
() => "",
undefined,
undefined,
`/payment/${(await params).uid}`
);
};
@@ -4,10 +4,13 @@ import { getTranslate } from "app/_utils";
import AdminAppsList from "@calcom/features/apps/AdminAppsList";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ category: string }> }) =>
await _generateMetadata(
(t) => t("apps"),
(t) => t("admin_apps_description")
(t) => t("admin_apps_description"),
undefined,
undefined,
`/settings/admin/apps/${(await params).category}`
);
const Page = async () => {
@@ -4,7 +4,10 @@ import { redirect } from "next/navigation";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("apps"),
(t) => t("admin_apps_description")
(t) => t("admin_apps_description"),
undefined,
undefined,
"/settings/admin/apps"
);
const Page = () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("feature_flags"),
(t) => t("admin_flags_description")
(t) => t("admin_flags_description"),
undefined,
undefined,
"/settings/admin/flags"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import ImpersonationView from "~/settings/admin/impersonation-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("admin"),
(t) => t("impersonation")
(t) => t("impersonation"),
undefined,
undefined,
"/settings/admin/impersonation"
);
const Page = async () => {
@@ -7,7 +7,10 @@ import LockedSMSView from "~/settings/admin/locked-sms-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("lockedSMS"),
(t) => t("admin_lockedSMS_description")
(t) => t("admin_lockedSMS_description"),
undefined,
undefined,
"/settings/admin/lockedSMS"
);
const Page = async () => {
@@ -7,7 +7,10 @@ import LegacyPage from "~/settings/admin/oauth-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("oAuth"),
(t) => t("admin_oAuth_description")
(t) => t("admin_oAuth_description"),
undefined,
undefined,
"/settings/admin/oAuth"
);
const Page = async () => {
@@ -15,7 +15,10 @@ export const generateMetadata = async ({ params }: { params: Params }) => {
if (!input.success) {
return await _generateMetadata(
(t) => t("editing_org"),
(t) => t("admin_orgs_edit_description")
(t) => t("admin_orgs_edit_description"),
undefined,
undefined,
"/settings/admin/organizations/edit"
);
}
@@ -23,7 +26,10 @@ export const generateMetadata = async ({ params }: { params: Params }) => {
return await _generateMetadata(
(t) => `${t("editing_org")}: ${org.name}`,
(t) => t("admin_orgs_edit_description")
(t) => t("admin_orgs_edit_description"),
undefined,
undefined,
`/settings/admin/organizations/${input.data.id}/edit`
);
};
@@ -8,7 +8,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("organizations"),
(t) => t("orgs_page_description")
(t) => t("orgs_page_description"),
undefined,
undefined,
"/settings/admin/organizations"
);
const Page = async () => {
@@ -3,7 +3,10 @@ import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("admin"),
() => ""
() => "",
undefined,
undefined,
"/settings/admin"
);
const Page = () => <h1>Admin index</h1>;
@@ -15,7 +15,10 @@ export const generateMetadata = async ({ params }: { params: Params }) => {
if (!input.success) {
return await _generateMetadata(
(t) => t("editing_user"),
(t) => t("admin_users_edit_description")
(t) => t("admin_users_edit_description"),
undefined,
undefined,
"/settings/admin/users/edit"
);
}
@@ -23,7 +26,10 @@ export const generateMetadata = async ({ params }: { params: Params }) => {
return await _generateMetadata(
(t) => `${t("editing_user")}: ${user.username}`,
(t) => t("admin_users_edit_description")
(t) => t("admin_users_edit_description"),
undefined,
undefined,
`/settings/admin/users/${input.data.id}/edit`
);
};
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("add_new_user"),
(t) => t("admin_users_add_description")
(t) => t("admin_users_add_description"),
undefined,
undefined,
"/settings/admin/users/add"
);
const Page = async () => {
@@ -7,7 +7,10 @@ import { Button } from "@calcom/ui/components/button";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("users"),
(t) => t("admin_users_description")
(t) => t("admin_users_description"),
undefined,
undefined,
"/settings/admin/users"
);
const Page = async () => {
@@ -7,7 +7,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("workspace_platforms"),
(t) => t("workspace_platforms_description")
(t) => t("workspace_platforms_description"),
undefined,
undefined,
"/settings/admin/workspace-platforms"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import BillingView from "~/settings/billing/billing-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("billing"),
(t) => t("manage_billing_description")
(t) => t("manage_billing_description"),
undefined,
undefined,
"/settings/billing"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import ApiKeysView, { NewApiKeyButton } from "~/settings/developer/api-keys-view
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("api_keys"),
(t) => t("create_first_api_key_description", { appName: APP_NAME })
(t) => t("create_first_api_key_description", { appName: APP_NAME }),
undefined,
undefined,
"/settings/developer/api-keys"
);
const Page = async () => {
@@ -14,7 +14,10 @@ import { buildLegacyRequest } from "@lib/buildLegacyCtx";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("webhooks"),
(t) => t("add_webhook_description", { appName: APP_NAME })
(t) => t("add_webhook_description", { appName: APP_NAME }),
undefined,
undefined,
"/settings/developer/webhooks"
);
const WebhooksViewServerWrapper = async () => {
@@ -6,10 +6,13 @@ import { EditWebhookView } from "@calcom/features/webhooks/pages/webhook-edit-vi
import { APP_NAME } from "@calcom/lib/constants";
import { WebhookRepository } from "@calcom/lib/server/repository/webhook";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("webhooks"),
(t) => t("add_webhook_description", { appName: APP_NAME })
(t) => t("add_webhook_description", { appName: APP_NAME }),
undefined,
undefined,
`/settings/developer/webhooks/${(await params).id}`
);
const Page = async ({ params: _params }: PageProps) => {
@@ -9,7 +9,10 @@ import { webhookRouter } from "@calcom/trpc/server/routers/viewer/webhook/_route
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("webhooks"),
(t) => t("add_webhook_description", { appName: APP_NAME })
(t) => t("add_webhook_description", { appName: APP_NAME }),
undefined,
undefined,
"/settings/developer/webhooks/new"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import AppearancePage from "~/settings/my-account/appearance-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("appearance"),
(t) => t("appearance_description")
(t) => t("appearance_description"),
undefined,
undefined,
"/settings/my-account/appearance"
);
const Page = async () => {
@@ -9,7 +9,10 @@ import { CalendarListContainer } from "@components/apps/CalendarListContainer";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("calendars"),
(t) => t("calendars_description")
(t) => t("calendars_description"),
undefined,
undefined,
"/settings/my-account/calendars"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import { ConferencingAppsViewWebWrapper } from "@calcom/atoms/connect/conferenci
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("conferencing"),
(t) => t("conferencing_description")
(t) => t("conferencing_description"),
undefined,
undefined,
"/settings/my-account/conferencing"
);
const Page = async () => {
@@ -9,7 +9,10 @@ import GeneralQueryView from "~/settings/my-account/general-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("general"),
(t) => t("general_description")
(t) => t("general_description"),
undefined,
undefined,
"/settings/my-account/general"
);
const Page = async () => {
@@ -9,7 +9,10 @@ import { OutOfOfficeToggleGroup } from "@calcom/features/settings/outOfOffice/Ou
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("out_of_office"),
(t) => t("out_of_office_description")
(t) => t("out_of_office_description"),
undefined,
undefined,
"/settings/my-account/out-of-office"
);
const Page = async () => {
@@ -9,7 +9,10 @@ import ProfileView from "~/settings/my-account/profile-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("profile"),
(t) => t("profile_description")
(t) => t("profile_description"),
undefined,
undefined,
"/settings/my-account/profile"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import PushNotificationsView from "~/settings/my-account/push-notifications-view
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("push_notifications"),
(t) => t("push_notifications_description")
(t) => t("push_notifications_description"),
undefined,
undefined,
"/settings/my-account/push-notifications"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => `${t("admin")} ${t("api_reference")}`,
(t) => t("leverage_our_api")
(t) => t("leverage_our_api"),
undefined,
undefined,
"/settings/organizations/admin-api"
);
const Page = async () => {
@@ -2,10 +2,13 @@ import { _generateMetadata } from "app/_utils";
import OrgAttributesEditPage from "@calcom/ee/organizations/pages/settings/attributes/attributes-edit-view";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("attribute"),
(t) => t("edit_attribute_description")
(t) => t("edit_attribute_description"),
undefined,
undefined,
`/settings/organizations/attributes/${(await params).id}/edit`
);
const OrgAttributesEditPageWrapper = async () => {
@@ -5,7 +5,10 @@ import OrgAttributesCreatePage from "@calcom/ee/organizations/pages/settings/att
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("attribute"),
(t) => t("create_attribute_description")
(t) => t("create_attribute_description"),
undefined,
undefined,
"/settings/organizations/attributes/create"
);
const OrgAttributesCreatePageWrapper = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("attributes"),
(t) => t("attribute_meta_description")
(t) => t("attribute_meta_description"),
undefined,
undefined,
"/settings/organizations/attributes"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("delegation_credential"),
(t) => t("delegation_credential_description")
(t) => t("delegation_credential_description"),
undefined,
undefined,
"/settings/organizations/delegation-credential"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("directory_sync"),
(t) => t("directory_sync_description")
(t) => t("directory_sync_description"),
undefined,
undefined,
"/settings/organizations/dsync"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("general"),
(t) => t("general_description")
(t) => t("general_description"),
undefined,
undefined,
"/settings/organizations/general"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("privacy"),
(t) => t("privacy_organization_description")
(t) => t("privacy_organization_description"),
undefined,
undefined,
"/settings/organizations/privacy"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("profile"),
(t) => t("profile_org_description")
(t) => t("profile_org_description"),
undefined,
undefined,
"/settings/organizations/profile"
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("sso_configuration"),
(t) => t("sso_configuration_description_orgs")
(t) => t("sso_configuration_description_orgs"),
undefined,
undefined,
"/settings/organizations/sso"
);
const Page = async () => {
@@ -3,10 +3,13 @@ import { _generateMetadata, getTranslate } from "app/_utils";
import LegacyPage from "@calcom/features/ee/teams/pages/team-appearance-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("booking_appearance"),
(t) => t("appearance_team_description")
(t) => t("appearance_team_description"),
undefined,
undefined,
`/settings/organizations/teams/other/${(await params).id}/appearance`
);
const Page = async () => {
@@ -5,10 +5,13 @@ import LegacyPage, {
} from "@calcom/features/ee/organizations/pages/settings/other-team-members-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("team_members"),
(t) => t("members_team_description")
(t) => t("members_team_description"),
undefined,
undefined,
`/settings/organizations/teams/other/${(await params).id}/members`
);
const Page = async () => {
@@ -3,10 +3,13 @@ import { _generateMetadata, getTranslate } from "app/_utils";
import LegacyPage from "@calcom/features/ee/organizations/pages/settings/other-team-profile-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("profile"),
(t) => t("profile_team_description")
(t) => t("profile_team_description"),
undefined,
undefined,
`/settings/organizations/teams/other/${(await params).id}/profile`
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("org_admin_other_teams"),
(t) => t("org_admin_other_teams_description")
(t) => t("org_admin_other_teams_description"),
undefined,
undefined,
"/settings/organizations/teams/other"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import ProfileImpersonationViewWrapper from "~/settings/security/impersonation-v
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("impersonation"),
(t) => t("impersonation_description")
(t) => t("impersonation_description"),
undefined,
undefined,
"/settings/security/impersonation"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import PasswordViewWrapper from "~/settings/security/password-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("password"),
(t) => t("password_description")
(t) => t("password_description"),
undefined,
undefined,
"/settings/security/password"
);
const Page = async () => {
@@ -7,7 +7,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("sso_configuration"),
(t) => t("sso_configuration_description")
(t) => t("sso_configuration_description"),
undefined,
undefined,
"/settings/security/sso"
);
const Page = async () => {
@@ -8,7 +8,10 @@ import TwoFactorAuthView from "~/settings/security/two-factor-auth-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("two_factor_auth"),
(t) => t("add_an_extra_layer_of_security")
(t) => t("add_an_extra_layer_of_security"),
undefined,
undefined,
"/settings/security/two-factor-auth"
);
const Page = async () => {
const t = await getTranslate();
@@ -3,10 +3,13 @@ import { _generateMetadata, getTranslate } from "app/_utils";
import LegacyPage from "@calcom/features/ee/teams/pages/team-appearance-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("booking_appearance"),
(t) => t("appearance_team_description")
(t) => t("appearance_team_description"),
undefined,
undefined,
`/settings/teams/${(await params).id}/appearance`
);
const Page = async () => {
@@ -3,10 +3,13 @@ import { _generateMetadata, getTranslate } from "app/_utils";
import LegacyPage from "@calcom/features/ee/teams/pages/team-members-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("team_members"),
(t) => t("members_team_description")
(t) => t("members_team_description"),
undefined,
undefined,
`/settings/teams/${(await params).id}/members`
);
const Page = async () => {
@@ -3,10 +3,13 @@ import { _generateMetadata, getTranslate } from "app/_utils";
import LegacyPage from "@calcom/features/ee/teams/pages/team-profile-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("profile"),
(t) => t("profile_team_description")
(t) => t("profile_team_description"),
undefined,
undefined,
`/settings/teams/${(await params).id}/profile`
);
const Page = async () => {
@@ -3,10 +3,13 @@ import { _generateMetadata, getTranslate } from "app/_utils";
import TeamSettingsView from "@calcom/features/ee/teams/pages/team-settings-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("settings"),
(t) => t("team_settings_description")
(t) => t("team_settings_description"),
undefined,
undefined,
`/settings/teams/${(await params).id}/settings`
);
const Page = async () => {
@@ -6,7 +6,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("teams"),
(t) => t("create_manage_teams_collaborative")
(t) => t("create_manage_teams_collaborative"),
undefined,
undefined,
"/settings/teams"
);
const Page = async () => {
@@ -13,7 +13,10 @@ import CreateANewLicenseKeyForm, { LayoutWrapper } from "~/settings/license-key/
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("set_up_your_organization"),
(t) => t("organizations_description")
(t) => t("organizations_description"),
undefined,
undefined,
"/settings/license-key/new"
);
const getData = withAppDirSsr<inferSSRProps<typeof getServerSideProps>>(getServerSideProps);
@@ -2,10 +2,13 @@ import { _generateMetadata } from "app/_utils";
import MembersPage from "~/members/members-view";
export const generateMetadata = async () =>
export const generateMetadata = async ({ params }: { params: Promise<{ id: string }> }) =>
await _generateMetadata(
(t) => t("organization_members"),
(t) => t("organization_description")
(t) => t("organization_description"),
undefined,
undefined,
`/settings/organizations/${(await params).id}/members`
);
const ServerPageWrapper = () => {
@@ -5,7 +5,10 @@ import Page from "@calcom/features/ee/organizations/pages/settings/appearance";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("appearance"),
(t) => t("appearance_org_description")
(t) => t("appearance_org_description"),
undefined,
undefined,
"/settings/organizations/appearance"
);
const ServerPageWrapper = () => {
@@ -8,7 +8,10 @@ import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("organization_members"),
(t) => t("organization_description")
(t) => t("organization_description"),
undefined,
undefined,
"/settings/organizations/members"
);
const Page = async () => {
@@ -11,7 +11,10 @@ import LegacyPage, { LayoutWrapper } from "~/settings/organizations/new/about-vi
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("about_your_organization"),
(t) => t("about_your_organization_description")
(t) => t("about_your_organization_description"),
undefined,
undefined,
"/settings/organizations/new/about"
);
const getData = withAppDirSsr(getServerSideProps);
@@ -11,7 +11,10 @@ import LegacyPage, { LayoutWrapper } from "~/settings/organizations/new/add-team
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("create_your_teams"),
(t) => t("create_your_teams_description")
(t) => t("create_your_teams_description"),
undefined,
undefined,
"/settings/organizations/new/add-teams"
);
const getData = withAppDirSsr(getServerSideProps);
@@ -12,7 +12,10 @@ import LegacyPage, { LayoutWrapper } from "~/settings/organizations/new/onboardi
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("handover_onboarding_page_title"),
(t) => t("handover_onboarding_page_description")
(t) => t("handover_onboarding_page_description"),
undefined,
undefined,
"/settings/organizations/new/handover"
);
const getData = withAppDirSsr(getServerSideProps);
@@ -11,7 +11,10 @@ import LegacyPage, { LayoutWrapper } from "~/settings/organizations/new/onboard-
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("invite_organization_admins"),
(t) => t("invite_organization_admins_description")
(t) => t("invite_organization_admins_description"),
undefined,
undefined,
"/settings/organizations/new/onboard-members"
);
const getData = withAppDirSsr(getServerSideProps);
@@ -13,7 +13,10 @@ import LegacyPage, { LayoutWrapper } from "~/settings/organizations/new/create-n
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("set_up_your_organization"),
(t) => t("organizations_description")
(t) => t("organizations_description"),
undefined,
undefined,
"/settings/organizations/new"
);
type Props = {
@@ -11,7 +11,10 @@ import LegacyPage, { LayoutWrapper } from "~/settings/organizations/new/payment-
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("organization_onboarding_status"),
(t) => t("organization_onboarding_status_description")
(t) => t("organization_onboarding_status_description"),
undefined,
undefined,
"/settings/organizations/new/status"
);
const getData = withAppDirSsr(getServerSideProps);
@@ -5,7 +5,10 @@ import PlatformBillingUpgrade from "~/settings/platform/billing/billing-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("platform_billing"),
(t) => t("manage_billing_description")
(t) => t("manage_billing_description"),
undefined,
undefined,
"/settings/platform/billing"
);
};
@@ -5,7 +5,10 @@ import ManagedUsersView from "~/settings/platform/managed-users/managed-users-vi
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("platform_members"),
(t) => t("platform_members_description")
(t) => t("platform_members_description"),
undefined,
undefined,
"/settings/platform/managed-users"
);
const ServerPageWrapper = () => {

Some files were not shown because too many files have changed in this diff Show More