chore: App router - add missing metadata for /[user] pages (#16516)

This commit is contained in:
Benny Joo authored and GitHub committed 2024-09-16 10:42:00 -04:00
1 parent 071c899ea6
commit aa3c91ebd6
16 files changed
+35 -43

No files matched your search

@@ -2,8 +2,11 @@ import { withAppDirSsr } from "app/WithAppDirSsr";
import withEmbedSsrAppDir from "app/WithEmbedSSR";
import { WithLayout } from "app/layoutHOC";
import LegacyPage from "~/users/views/users-type-public-view";
import { getServerSideProps, type PageProps } from "~/users/views/users-type-public-view.getServerSideProps";
import { getServerSideProps } from "@server/lib/[user]/[type]/getServerSideProps";
import LegacyPage, { type PageProps } from "~/users/views/users-type-public-view";
export { generateMetadata } from "../page";
const getData = withAppDirSsr<PageProps>(getServerSideProps);
+3 -4
View File
@@ -9,11 +9,10 @@ import { EventRepository } from "@calcom/lib/server/repository/event";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
import { getServerSideProps } from "@server/lib/[user]/[type]/getServerSideProps";
import type { PageProps as LegacyPageProps } from "~/users/views/users-type-public-view";
import LegacyPage from "~/users/views/users-type-public-view";
import {
getServerSideProps,
type PageProps as LegacyPageProps,
} from "~/users/views/users-type-public-view.getServerSideProps";
export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const legacyCtx = buildLegacyCtx(headers(), cookies(), params, searchParams);
+5 -1
View File
@@ -2,8 +2,12 @@ import { withAppDirSsr } from "app/WithAppDirSsr";
import withEmbedSsrAppDir from "app/WithEmbedSSR";
import { WithLayout } from "app/layoutHOC";
import { getServerSideProps } from "@server/lib/[user]/getServerSideProps";
import type { PageProps as UserPageProps } from "~/users/views/users-public-view";
import LegacyPage from "~/users/views/users-public-view";
import { getServerSideProps, type UserPageProps } from "~/users/views/users-public-view.getServerSideProps";
export { generateMetadata } from "../page";
const getData = withAppDirSsr<UserPageProps>(getServerSideProps);
+4 -2
View File
@@ -8,8 +8,10 @@ import { getLayout } from "@calcom/features/MainLayoutAppDir";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
import { getServerSideProps } from "@server/lib/[user]/getServerSideProps";
import type { PageProps as LegacyPageProps } from "~/users/views/users-public-view";
import LegacyPage from "~/users/views/users-public-view";
import { getServerSideProps, type UserPageProps } from "~/users/views/users-public-view.getServerSideProps";
export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
@@ -21,5 +23,5 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
);
};
const getData = withAppDirSsr<UserPageProps>(getServerSideProps);
const getData = withAppDirSsr<LegacyPageProps>(getServerSideProps);
export default WithLayout({ getLayout, getData, Page: LegacyPage })<"P">;