Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Disable quick create page when quick create is disabled (#1514)
Luke Vella629d6ec7b7a3
diff --git a/apps/web/src/app/[locale]/quick-create/page.tsx b/apps/web/src/app/[locale]/quick-create/page.tsxindex 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 (<div className="flex min-h-screen p-2"><div className="flex flex-1 flex-col gap-6 rounded-xl border bg-white p-6">@@ -28,7 +32,7 @@ export default async function QuickCreatePage() {<Icon><LogInIcon /></Icon>- Login+ {t("login")}</Link></Button></div>