diff --git a/apps/web/src/components/error-page.tsx b/apps/web/src/components/error-page.tsx index d7a8b6341..e6e8b0234 100644 --- a/apps/web/src/components/error-page.tsx +++ b/apps/web/src/components/error-page.tsx @@ -3,12 +3,8 @@ import Link from "next/link"; import { useTranslation } from "next-i18next"; import * as React from "react"; -import { Button } from "@/components/button"; -import Chat from "@/components/icons/chat.svg"; import EmojiSad from "@/components/icons/emoji-sad.svg"; -import { showCrispChat } from "./crisp-chat"; - export interface ComponentProps { icon?: React.ComponentType<{ className?: string }>; title: string; @@ -20,7 +16,7 @@ const ErrorPage: React.FunctionComponent = ({ title, description, }) => { - const { t } = useTranslation("errors"); + const { t } = useTranslation(["common", "errors"]); return (
@@ -35,12 +31,16 @@ const ErrorPage: React.FunctionComponent = ({

{description}

- - {t("goToHome")} + + {t("errors:goToHome")} + + + {t("support")} -
diff --git a/apps/web/src/pages/404.tsx b/apps/web/src/pages/404.tsx index 76f22dbab..70480e9a6 100644 --- a/apps/web/src/pages/404.tsx +++ b/apps/web/src/pages/404.tsx @@ -1,12 +1,14 @@ -import { GetStaticProps, NextPage } from "next"; +import { GetStaticProps } from "next"; import { useTranslation } from "next-i18next"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import React from "react"; import ErrorPage from "@/components/error-page"; import DocumentSearch from "@/components/icons/document-search.svg"; +import { getStandardLayout } from "@/components/layouts/standard-layout"; +import { NextPageWithLayout } from "@/types"; -const Custom404: NextPage = () => { +const Custom404: NextPageWithLayout = () => { const { t } = useTranslation("errors"); return ( { ); }; +Custom404.getLayout = getStandardLayout; + export const getStaticProps: GetStaticProps = async ({ locale = "en" }) => { return { props: { - ...(await serverSideTranslations(locale, ["errors"])), + ...(await serverSideTranslations(locale, ["common", "errors"])), }, }; };