Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Add quick create config (#1513)

Luke Vellaa5b9edf5e648
diff --git a/apps/web/src/app/[locale]/(auth)/layout.tsx b/apps/web/src/app/[locale]/(auth)/layout.tsx
index 594e85f5d..00810448e 100644
--- a/apps/web/src/app/[locale]/(auth)/layout.tsx
+++ b/apps/web/src/app/[locale]/(auth)/layout.tsx
@@ -3,9 +3,11 @@ import { DotPattern } from "@rallly/ui/dot-pattern";
import type { Metadata } from "next";
import { Logo } from "@/components/logo";
-import { isQuickCreateEnabled } from "@/features/quick-create";
-import { QuickStartButton } from "@/features/quick-create/quick-create-button";
-import { QuickStartWidget } from "@/features/quick-create/quick-create-widget";
+import {
+ isQuickCreateEnabled,
+ QuickCreateButton,
+ QuickCreateWidget,
+} from "@/features/quick-create";
export default async function Layout({
children,
@@ -24,14 +26,14 @@ export default async function Layout({
</div>
{isQuickCreateEnabled ? (
<div className="flex justify-center lg:hidden">
- <QuickStartButton />
+ <QuickCreateButton />
</div>
) : null}
</div>
{isQuickCreateEnabled ? (
<div className="relative hidden flex-1 flex-col justify-center rounded-lg border border-gray-100 bg-gray-50 lg:flex lg:p-16">
<div className="z-10 mx-auto w-full max-w-md">
- <QuickStartWidget />
+ <QuickCreateWidget />
</div>
<DotPattern
cx={10}
diff --git a/apps/web/src/app/[locale]/quick-create/page.tsx b/apps/web/src/app/[locale]/quick-create/page.tsx
index 4fd43a310..2fb5dbc3b 100644
--- a/apps/web/src/app/[locale]/quick-create/page.tsx
+++ b/apps/web/src/app/[locale]/quick-create/page.tsx
@@ -4,7 +4,7 @@ import { LogInIcon } from "lucide-react";
import Link from "next/link";
import { notFound } from "next/navigation";
-import { QuickStartWidget } from "@/features/quick-create/quick-create-widget";
+import { QuickCreateWidget } from "@/features/quick-create/quick-create-widget";
import { isSelfHosted } from "@/utils/constants";
export default async function QuickCreatePage() {
@@ -18,7 +18,7 @@ export default async function QuickCreatePage() {
<div className="mx-auto w-full max-w-md flex-1">
<div className="space-y-8">
<div className="flex-1">
- <QuickStartWidget />
+ <QuickCreateWidget />
</div>
</div>
</div>
diff --git a/apps/web/src/features/quick-create/constants.ts b/apps/web/src/features/quick-create/constants.ts
index a197239c7..1964bad61 100644
--- a/apps/web/src/features/quick-create/constants.ts
+++ b/apps/web/src/features/quick-create/constants.ts
@@ -1,2 +1 @@
-export const isQuickCreateEnabled =
- process.env.NEXT_PUBLIC_SELF_HOSTED !== "true";
+export const isQuickCreateEnabled = process.env.QUICK_CREATE_ENABLED === "true";
diff --git a/apps/web/src/features/quick-create/index.ts b/apps/web/src/features/quick-create/index.ts
index 40c985db8..757efce3e 100644
--- a/apps/web/src/features/quick-create/index.ts
+++ b/apps/web/src/features/quick-create/index.ts
@@ -1 +1,3 @@
export { isQuickCreateEnabled } from "./constants";
+export { QuickCreateButton } from "./quick-create-button";
+export { QuickCreateWidget } from "./quick-create-widget";
diff --git a/apps/web/src/features/quick-create/quick-create-button.tsx b/apps/web/src/features/quick-create/quick-create-button.tsx
index bf27f55c9..83ab3a465 100644
--- a/apps/web/src/features/quick-create/quick-create-button.tsx
+++ b/apps/web/src/features/quick-create/quick-create-button.tsx
@@ -6,7 +6,7 @@ import { Trans } from "react-i18next/TransWithoutContext";
import { getTranslation } from "@/i18n/server";
-export async function QuickStartButton() {
+export async function QuickCreateButton() {
const { t } = await getTranslation();
return (
<Button className="rounded-full" asChild>
diff --git a/apps/web/src/features/quick-create/quick-create-widget.tsx b/apps/web/src/features/quick-create/quick-create-widget.tsx
index c473fe7b2..5aea9db3d 100644
--- a/apps/web/src/features/quick-create/quick-create-widget.tsx
+++ b/apps/web/src/features/quick-create/quick-create-widget.tsx
@@ -10,7 +10,7 @@ import { getTranslation } from "@/i18n/server";
import { RelativeDate } from "./components/relative-date";
-export async function QuickStartWidget() {
+export async function QuickCreateWidget() {
const polls = await getGuestPolls();
const { t } = await getTranslation();
return (
diff --git a/turbo.json b/turbo.json
index 9658ed1ac..b6092e921 100644
--- a/turbo.json
+++ b/turbo.json
@@ -119,6 +119,7 @@
"QSTASH_TOKEN",
"QSTASH_CURRENT_SIGNING_KEY",
"QSTASH_NEXT_SIGNING_KEY",
- "QSTASH_URL"
+ "QSTASH_URL",
+ "QUICK_CREATE_ENABLED"
]
}