fix: Link on 'Not Found' page for root share leads to custom domain landing

This commit is contained in:
Tom Moor
2023-11-01 23:20:41 -04:00
parent f0bf60eb40
commit 1b73339800
2 changed files with 3 additions and 2 deletions

View File

@@ -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 = () => {
<Empty>
<Trans>
We were unable to find the page youre looking for. Go to the{" "}
<Link to="/home">homepage</Link>?
<Link to={homePath()}>homepage</Link>?
</Trans>
</Empty>
</Scene>

View File

@@ -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 {