diff --git a/components/page-layout.tsx b/components/page-layout.tsx index 1cd6fd5ac..c9a24e3f5 100644 --- a/components/page-layout.tsx +++ b/components/page-layout.tsx @@ -47,19 +47,12 @@ const Menu: React.VoidFunctionComponent<{ className: string }> = ({ Blog - - - Support - - + + Support + diff --git a/components/page-layout/footer.tsx b/components/page-layout/footer.tsx index a15dd214b..932fe30e8 100644 --- a/components/page-layout/footer.tsx +++ b/components/page-layout/footer.tsx @@ -64,11 +64,12 @@ const Footer: React.VoidFunctionComponent = () => {
  • - - - Support - - + + Support +
  • diff --git a/components/standard-layout.tsx b/components/standard-layout.tsx index abd439ac3..17949e2d7 100644 --- a/components/standard-layout.tsx +++ b/components/standard-layout.tsx @@ -35,12 +35,15 @@ const AppMenu: React.VoidFunctionComponent<{ className?: string }> = ({ New Poll - - - - Support - - + + + Support + ); }; @@ -98,12 +101,15 @@ const StandardLayout: React.VoidFunctionComponent<{ New Poll - - - - Support - - + + + Support +
    - - - Support - - + + Support + Discussions diff --git a/components/support.tsx b/components/support.tsx deleted file mode 100644 index 6092f2366..000000000 --- a/components/support.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import { Disclosure } from "@headlessui/react"; -import { Trans, useTranslation } from "next-i18next"; -import * as React from "react"; - -import Button from "@/components/button"; -import Chat from "@/components/icons/chat.svg"; - -import { showCrispChat } from "./crisp-chat"; -import PageLayout from "./page-layout"; - -const Support: React.VoidFunctionComponent = () => { - const { t } = useTranslation("support"); - return ( - -
    -

    Support

    -
    -
    -

    General

    - - - - - - }} - /> - - - - - }} - /> - - - - ), - }} - /> - - - - - {t("legacyPollsQuestion")} - - - }} - /> - - - - - {t("contributeQuestion")} - - - , - }} - /> - - -

    Privacy & Security

    - - - {t("isMyDataSafeQuestion")} - - - }} - /> - - -

    Self-hosting

    - - - {t("selfHostQuestion")} - - - , - }} - /> - - - - - {t("canYouHelpMeSetUpRalllyQuestion")} - - - - ), - }} - /> - - -
    -
    -
    -
    - -
    -

    {t("supportContactTitle")}

    -

    - , - }} - /> -

    - -
    -
    -
    -
    -
    -
    -
    - ); -}; - -export default Support; diff --git a/next.config.js b/next.config.js index 741ce73bb..1e1c831e4 100644 --- a/next.config.js +++ b/next.config.js @@ -26,6 +26,16 @@ const moduleExports = { typescript: { ignoreBuildErrors: true, }, + async redirects() { + return [ + { + source: "/support", + destination: "https://support.rallly.co", + permanent: true, + }, + ]; + }, + async rewrites() { return [ { diff --git a/pages/support.tsx b/pages/support.tsx deleted file mode 100644 index c0d2d2199..000000000 --- a/pages/support.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { GetStaticProps } from "next"; -import { serverSideTranslations } from "next-i18next/serverSideTranslations"; - -export { default } from "@/components/support"; - -export const getStaticProps: GetStaticProps = async ({ locale = "en" }) => { - try { - return { - props: { - ...(await serverSideTranslations(locale, ["homepage", "support"])), - }, - }; - } catch { - return { notFound: true }; - } -};