Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Link to support page on 404

Luke Vella149e5bbe5e8d
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<ComponentProps> = ({
title,
description,
}) => {
- const { t } = useTranslation("errors");
+ const { t } = useTranslation(["common", "errors"]);
return (
<div className="flex h-[calc(100vh-100px)] w-full items-center justify-center">
<Head>
@@ -35,12 +31,16 @@ const ErrorPage: React.FunctionComponent<ComponentProps> = ({
</div>
<p>{description}</p>
<div className="flex justify-center space-x-3">
- <Link href="/" passHref={true} className="btn-default">
- {t("goToHome")}
+ <Link href="/" className="btn-primary">
+ {t("errors:goToHome")}
+ </Link>
+ <Link
+ href="https://support.rallly.co"
+ passHref={true}
+ className="btn-default"
+ >
+ {t("support")}
</Link>
- <Button icon={<Chat />} onClick={showCrispChat}>
- {t("startChat")}
- </Button>
</div>
</div>
</div>
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 (
<ErrorPage
@@ -17,10 +19,12 @@ const Custom404: NextPage = () => {
);
};
+Custom404.getLayout = getStandardLayout;
+
export const getStaticProps: GetStaticProps = async ({ locale = "en" }) => {
return {
props: {
- ...(await serverSideTranslations(locale, ["errors"])),
+ ...(await serverSideTranslations(locale, ["common", "errors"])),
},
};
};