mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-28 17:56:37 +02:00
🐛 Disable quick create page when quick create is disabled (#1514)
This commit is contained in:
parent
a5b9edf5e6
commit
629d6ec7b7
1 changed files with 9 additions and 5 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue