chore: Remove Pages Router / Render App Router - /video (#16518)
* /video: Remove Pages Router / Render App Router * fix * add meeting_unavailable i18n * remove <Head> from videos view * add correct metadata to video/[uid] * add safety to videos-single-view logic --------- Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
1 parent
0eb72d66a7
commit
1a4afe06c8
17 files changed
+123
-163
No files matched your search
@@ -1,20 +0,0 @@
|
||||
import { withAppDirSsr } from "app/WithAppDirSsr";
|
||||
import { _generateMetadata } from "app/_utils";
|
||||
import { WithLayout } from "app/layoutHOC";
|
||||
|
||||
import { APP_NAME } from "@calcom/lib/constants";
|
||||
|
||||
import { getServerSideProps } from "@lib/video/[uid]/getServerSideProps";
|
||||
|
||||
import type { PageProps } from "~/videos/views/videos-single-view";
|
||||
import VideosSingleView from "~/videos/views/videos-single-view";
|
||||
|
||||
export const generateMetadata = async () =>
|
||||
await _generateMetadata(
|
||||
() => `${APP_NAME} Video`,
|
||||
(t) => t("quick_video_meeting")
|
||||
);
|
||||
|
||||
const getData = withAppDirSsr<PageProps>(getServerSideProps);
|
||||
|
||||
export default WithLayout({ getData, Page: VideosSingleView, getLayout: null })<"P">;
|
||||
@@ -0,0 +1,39 @@
|
||||
import { withAppDirSsr } from "app/WithAppDirSsr";
|
||||
import { getTranslate } from "app/_utils";
|
||||
import { WithLayout } from "app/layoutHOC";
|
||||
|
||||
import { APP_NAME, SEO_IMG_OGIMG_VIDEO, WEBSITE_URL } from "@calcom/lib/constants";
|
||||
|
||||
import { getServerSideProps } from "@lib/video/[uid]/getServerSideProps";
|
||||
|
||||
import type { PageProps } from "~/videos/views/videos-single-view";
|
||||
import VideosSingleView from "~/videos/views/videos-single-view";
|
||||
|
||||
export const generateMetadata = async () => {
|
||||
const t = await getTranslate();
|
||||
return {
|
||||
title: `${APP_NAME} Video`,
|
||||
description: t("quick_video_meeting"),
|
||||
openGraph: {
|
||||
title: `${APP_NAME} Video`,
|
||||
description: t("quick_video_meeting"),
|
||||
url: `${WEBSITE_URL}/video`,
|
||||
images: [
|
||||
{
|
||||
url: SEO_IMG_OGIMG_VIDEO,
|
||||
},
|
||||
],
|
||||
type: "website",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: `${APP_NAME} Video`,
|
||||
description: t("quick_video_meeting"),
|
||||
images: [SEO_IMG_OGIMG_VIDEO],
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const getData = withAppDirSsr<PageProps>(getServerSideProps);
|
||||
|
||||
export default WithLayout({ getData, Page: VideosSingleView, getLayout: null })<"P">;
|
||||
+2
-2
@@ -9,8 +9,8 @@ import MeetingEnded from "~/videos/views/videos-meeting-ended-single-view";
|
||||
|
||||
export const generateMetadata = async () =>
|
||||
await _generateMetadata(
|
||||
() => "Meeting Unavailable",
|
||||
() => "Meeting Unavailable"
|
||||
(t) => t("meeting_unavailable"),
|
||||
(t) => t("meeting_unavailable")
|
||||
);
|
||||
|
||||
const getData = withAppDirSsr<PageProps>(getServerSideProps);
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user