chore: migrate /auth/verify-email-change (#18942)

This commit is contained in:
Benny Joo
2025-01-28 11:34:39 -05:00
committed by GitHub
parent e5946db179
commit a1e4959fb7
5 changed files with 27 additions and 31 deletions
@@ -0,0 +1,25 @@
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 "@server/lib/auth/verify-email-change/getServerSideProps";
import type { PageProps as ClientPageProps } from "~/auth/verify-email-change-view";
import VerifyEmailChange from "~/auth/verify-email-change-view";
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => t("verify_email_change"),
() => ""
);
};
const getData = withAppDirSsr<ClientPageProps>(getServerSideProps);
const ServerPage = async ({ params, searchParams }: ServerPageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
return <VerifyEmailChange {...props} />;
};
export default ServerPage;
@@ -1,22 +0,0 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { getServerSideProps } from "@server/lib/auth/verify-email-change/getServerSideProps";
import type { PageProps } from "~/auth/verify-email-change-view";
import VerifyEmailChange from "~/auth/verify-email-change-view";
export const generateMetadata = async () => {
return await _generateMetadata(
() => "Verify email change",
() => ""
);
};
const getData = withAppDirSsr<PageProps>(getServerSideProps);
export default WithLayout({
getLayout: null,
Page: VerifyEmailChange,
getData,
});
+1
View File
@@ -160,6 +160,7 @@ export const config = {
"/auth/signin",
"/auth/oauth2/authorize",
"/auth/platform/authorize",
"/auth/verify-email-change",
"/auth/verify-email",
"/auth/verify",
/**
@@ -1,9 +0,0 @@
import PageWrapper from "@components/PageWrapper";
import type { PageProps } from "~/auth/verify-email-change-view";
import VerifyEmailChange from "~/auth/verify-email-change-view";
const Page = (props: PageProps) => <VerifyEmailChange {...props} />;
Page.PageWrapper = PageWrapper;
export default Page;
export { getServerSideProps } from "@server/lib/auth/verify-email-change/getServerSideProps";
@@ -2945,5 +2945,6 @@
"asc": "Asc",
"desc": "Desc",
"verify_email": "Verify email",
"verify_email_change": "Verify email change",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
}