From 1b733398005327a7f75df91e6f174ac66dd8c7e1 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 1 Nov 2023 23:20:41 -0400 Subject: [PATCH] fix: Link on 'Not Found' page for root share leads to custom domain landing --- app/scenes/Error404.tsx | 3 ++- app/utils/routeHelpers.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/scenes/Error404.tsx b/app/scenes/Error404.tsx index a78c0c37c..a6a9adc70 100644 --- a/app/scenes/Error404.tsx +++ b/app/scenes/Error404.tsx @@ -3,6 +3,7 @@ import { useTranslation, Trans } from "react-i18next"; import { Link } from "react-router-dom"; import Empty from "~/components/Empty"; import Scene from "~/components/Scene"; +import { homePath } from "~/utils/routeHelpers"; const Error404 = () => { const { t } = useTranslation(); @@ -12,7 +13,7 @@ const Error404 = () => { We were unable to find the page you’re looking for. Go to the{" "} - homepage? + homepage? diff --git a/app/utils/routeHelpers.ts b/app/utils/routeHelpers.ts index d71fc03c8..840330a97 100644 --- a/app/utils/routeHelpers.ts +++ b/app/utils/routeHelpers.ts @@ -5,7 +5,7 @@ import Document from "~/models/Document"; import env from "~/env"; export function homePath(): string { - return "/home"; + return env.ROOT_SHARE_ID ? "/" : "/home"; } export function draftsPath(): string {