Files
Benny JooGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>[email protected] <[email protected]>
69efc26f36 perf: slim down middleware matcher (#20735)
* wip

* wip

* refactor

* add pathname

* fix

* fix: manually construct pathname for metadata functions

Co-Authored-By: [email protected] <[email protected]>

* fix: add pathname parameter to all metadata functions

Co-Authored-By: [email protected] <[email protected]>

* fix: add pathname parameter to remaining metadata functions

Co-Authored-By: [email protected] <[email protected]>

* 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: [email protected] <[email protected]>
2025-04-17 19:55:01 -07:00

31 lines
1.1 KiB
TypeScript

import { withAppDirSsr } from "app/WithAppDirSsr";
import type { PageProps as ServerPageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { cookies, headers } from "next/headers";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
import { getServerSideProps } from "@lib/video/meeting-ended/[uid]/getServerSideProps";
import type { PageProps as ClientPageProps } from "~/videos/views/videos-meeting-ended-single-view";
import MeetingEnded from "~/videos/views/videos-meeting-ended-single-view";
export const generateMetadata = async ({ params }: ServerPageProps) =>
await _generateMetadata(
(t) => t("meeting_unavailable"),
(t) => t("meeting_unavailable"),
undefined,
undefined,
`/video/meeting-ended/${(await params).uid}`
);
const getData = withAppDirSsr<ClientPageProps>(getServerSideProps);
const ServerPage = async ({ params, searchParams }: ServerPageProps) => {
const context = buildLegacyCtx(await headers(), await cookies(), await params, await searchParams);
const props = await getData(context);
return <MeetingEnded {...props} />;
};
export default ServerPage;