From 629d6ec7b7a36deba224b75323d29f182acf9ee7 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Fri, 24 Jan 2025 16:41:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Disable=20quick=20create=20page?= =?UTF-8?q?=20when=20quick=20create=20is=20disabled=20(#1514)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app/[locale]/quick-create/page.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/web/src/app/[locale]/quick-create/page.tsx b/apps/web/src/app/[locale]/quick-create/page.tsx index 2fb5dbc3b..f0ede63c5 100644 --- a/apps/web/src/app/[locale]/quick-create/page.tsx +++ b/apps/web/src/app/[locale]/quick-create/page.tsx @@ -4,14 +4,18 @@ import { LogInIcon } from "lucide-react"; import Link from "next/link"; import { notFound } from "next/navigation"; -import { QuickCreateWidget } from "@/features/quick-create/quick-create-widget"; -import { isSelfHosted } from "@/utils/constants"; +import { + isQuickCreateEnabled, + QuickCreateWidget, +} from "@/features/quick-create"; +import { getTranslation } from "@/i18n/server"; export default async function QuickCreatePage() { - if (isSelfHosted) { - // self hosted users should not see this page + if (!isQuickCreateEnabled) { notFound(); } + + const { t } = await getTranslation(); return (
@@ -28,7 +32,7 @@ export default async function QuickCreatePage() { - Login + {t("login")}