diff --git a/apps/web/pages/auth/forgot-password/[id].tsx b/apps/web/pages/auth/forgot-password/[id].tsx index 145a396b7d..2fa048df1c 100644 --- a/apps/web/pages/auth/forgot-password/[id].tsx +++ b/apps/web/pages/auth/forgot-password/[id].tsx @@ -2,6 +2,7 @@ import type { ResetPasswordRequest } from "@prisma/client"; import debounce from "lodash/debounce"; import type { GetServerSidePropsContext } from "next"; import { getCsrfToken } from "next-auth/react"; +import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import Link from "next/link"; import React, { useMemo } from "react"; @@ -185,6 +186,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { }, id, csrfToken: await getCsrfToken({ req: context.req }), + ...(await serverSideTranslations(context.locale || "en", ["common"])), }, }; } catch (reason) { diff --git a/apps/web/pages/auth/forgot-password/index.tsx b/apps/web/pages/auth/forgot-password/index.tsx index 08becc2793..1ea2df7c21 100644 --- a/apps/web/pages/auth/forgot-password/index.tsx +++ b/apps/web/pages/auth/forgot-password/index.tsx @@ -1,6 +1,7 @@ import debounce from "lodash/debounce"; import type { GetServerSidePropsContext } from "next"; import { getCsrfToken } from "next-auth/react"; +import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import Link from "next/link"; import { useRouter } from "next/router"; import type { SyntheticEvent } from "react"; @@ -144,5 +145,6 @@ ForgotPassword.getInitialProps = async (context: GetServerSidePropsContext) => { return { csrfToken: await getCsrfToken(context), + ...(await serverSideTranslations(context.locale || "en", ["common"])), }; };