mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-25 20:01:53 -05:00
move privacy and term envs into next config
This commit is contained in:
@@ -18,6 +18,8 @@ const nextConfig = {
|
||||
// Will be available on both server and client
|
||||
posthogApiHost: process.env.POSTHOG_API_HOST,
|
||||
posthogApiKey: process.env.POSTHOG_API_KEY,
|
||||
termsUrl: process.env.NEXT_PUBLIC_TERMS_URL,
|
||||
privacyUrl: process.env.NEXT_PUBLIC_PRIVACY_URL,
|
||||
},
|
||||
async redirects() {
|
||||
return [
|
||||
|
||||
+11
-10
@@ -2,10 +2,13 @@ import { XCircleIcon } from "@heroicons/react/solid";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import getConfig from "next/config";
|
||||
import { useState } from "react";
|
||||
import BaseLayoutUnauthorized from "../../components/layout/BaseLayoutUnauthorized";
|
||||
import { createUser } from "../../lib/users";
|
||||
|
||||
const { publicRuntimeConfig } = getConfig();
|
||||
|
||||
export default function SignUpPage() {
|
||||
const router = useRouter();
|
||||
const [error, setError] = useState<string>("");
|
||||
@@ -155,29 +158,27 @@ export default function SignUpPage() {
|
||||
<a className="text-red hover:text-red-600">Log in.</a>
|
||||
</Link>
|
||||
</div>
|
||||
{(process.env.NEXT_PUBLIC_TERMS_URL ||
|
||||
process.env.NEXT_PUBLIC_PRIVACY_URL) && (
|
||||
{(publicRuntimeConfig.termsUrl ||
|
||||
publicRuntimeConfig.privacyUrl) && (
|
||||
<div className="mt-3 text-xs text-center text-gray-400">
|
||||
By clicking "Sign Up", you agree to our
|
||||
<br />
|
||||
{process.env.NEXT_PUBLIC_TERMS_URL && (
|
||||
{publicRuntimeConfig.termsUrl && (
|
||||
<a
|
||||
className="text-red hover:text-red-600"
|
||||
href={process.env.NEXT_PUBLIC_TERMS_URL}
|
||||
href={publicRuntimeConfig.termsUrl}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
terms of service
|
||||
</a>
|
||||
)}
|
||||
{process.env.NEXT_PUBLIC_TERMS_URL &&
|
||||
process.env.NEXT_PUBLIC_PRIVACY_URL && (
|
||||
<span> and </span>
|
||||
)}
|
||||
{process.env.NEXT_PUBLIC_PRIVACY_URL && (
|
||||
{publicRuntimeConfig.termsUrl &&
|
||||
publicRuntimeConfig.privacyUrl && <span> and </span>}
|
||||
{publicRuntimeConfig.privacyUrl && (
|
||||
<a
|
||||
className="text-red hover:text-red-600"
|
||||
href={process.env.NEXT_PUBLIC_PRIVACY_URL}
|
||||
href={publicRuntimeConfig.privacyUrl}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user