mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-01 07:28:35 +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 Link from "next/link";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
|
||||||
import { QuickCreateWidget } from "@/features/quick-create/quick-create-widget";
|
import {
|
||||||
import { isSelfHosted } from "@/utils/constants";
|
isQuickCreateEnabled,
|
||||||
|
QuickCreateWidget,
|
||||||
|
} from "@/features/quick-create";
|
||||||
|
import { getTranslation } from "@/i18n/server";
|
||||||
|
|
||||||
export default async function QuickCreatePage() {
|
export default async function QuickCreatePage() {
|
||||||
if (isSelfHosted) {
|
if (!isQuickCreateEnabled) {
|
||||||
// self hosted users should not see this page
|
|
||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { t } = await getTranslation();
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen p-2">
|
<div className="flex min-h-screen p-2">
|
||||||
<div className="flex flex-1 flex-col gap-6 rounded-xl border bg-white p-6">
|
<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>
|
<Icon>
|
||||||
<LogInIcon />
|
<LogInIcon />
|
||||||
</Icon>
|
</Icon>
|
||||||
Login
|
{t("login")}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue