Scheduling infrastructure for absolutely everyone.
Added serverside translations to the forgot password page. (#7618)
Jeroen Reumkens5ebbd514d8f3
diff --git a/apps/web/pages/auth/forgot-password/[id].tsx b/apps/web/pages/auth/forgot-password/[id].tsxindex 145a396b7d5..2fa048df1c1 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.tsxindex 08becc2793b..1ea2df7c21b 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"])),};};