mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-30 22:49:03 +02:00
♻️ Only force dynamic render for self-hosted
This commit is contained in:
parent
208a764c9a
commit
9e36a1fa7c
1 changed files with 4 additions and 2 deletions
|
@ -5,9 +5,11 @@ import { LoginForm } from "@/app/[locale]/(auth)/login/login-form";
|
|||
import { Params } from "@/app/[locale]/types";
|
||||
import { getTranslation } from "@/app/i18n";
|
||||
import { AuthCard } from "@/components/auth/auth-layout";
|
||||
import { isOIDCEnabled, oidcName } from "@/utils/constants";
|
||||
import { isOIDCEnabled, isSelfHosted, oidcName } from "@/utils/constants";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
// Self-hosted instances only have env vars for OIDC at runtime, so we need to
|
||||
// use force-dynamic to avoid statically rendering this page during build time..
|
||||
export const dynamic = isSelfHosted ? "force-dynamic" : "auto";
|
||||
|
||||
export default async function LoginPage({ params }: { params: Params }) {
|
||||
const { t } = await getTranslation(params.locale);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue