diff --git a/.env.docker b/.env.docker index bcb5a5cffe..8700d35a5d 100644 --- a/.env.docker +++ b/.env.docker @@ -54,6 +54,11 @@ NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1 # Other # ########## +# Display privacy policy, imprint and terms of service links in the footer of signup & public pages. +NEXT_PUBLIC_PRIVACY_URL= +NEXT_PUBLIC_TERMS_URL= +NEXT_PUBLIC_IMPRINT_URL= + # Disable Sentry warning SENTRY_IGNORE_API_RESOLUTION_ERROR=1 diff --git a/.env.example b/.env.example index 4f86dfe25f..7a36a72bc9 100644 --- a/.env.example +++ b/.env.example @@ -61,6 +61,11 @@ SMTP_PASSWORD=smtpPassword # Other # ########## +# Display privacy policy, imprint and terms of service links in the footer of signup & public pages. +NEXT_PUBLIC_PRIVACY_URL= +NEXT_PUBLIC_TERMS_URL= +NEXT_PUBLIC_IMPRINT_URL= + # Disable Sentry warning SENTRY_IGNORE_API_RESOLUTION_ERROR=1 diff --git a/apps/web/components/LinkSurvey.tsx b/apps/web/app/s/[surveyId]/LinkSurvey.tsx similarity index 100% rename from apps/web/components/LinkSurvey.tsx rename to apps/web/app/s/[surveyId]/LinkSurvey.tsx diff --git a/apps/web/app/s/[surveyId]/SurveyPage.tsx b/apps/web/app/s/[surveyId]/SurveyPage.tsx index e430ee5049..546441d63c 100644 --- a/apps/web/app/s/[surveyId]/SurveyPage.tsx +++ b/apps/web/app/s/[surveyId]/SurveyPage.tsx @@ -1,6 +1,7 @@ "use client"; -import LinkSurvey from "@/components/LinkSurvey"; +import LinkSurvey from "@/app/s/[surveyId]/LinkSurvey"; +import LegalFooter from "@/components/shared/LegalFooter"; import LoadingSpinner from "@/components/shared/LoadingSpinner"; import { useLinkSurvey } from "@/lib/linkSurvey/linkSurvey"; @@ -27,5 +28,10 @@ export default function SurveyPage({ surveyId }: SurveyPageProps) { ); } - return ; + return ( + <> + + + + ); } diff --git a/apps/web/components/shared/LegalFooter.tsx b/apps/web/components/shared/LegalFooter.tsx new file mode 100644 index 0000000000..b27dc70cf7 --- /dev/null +++ b/apps/web/components/shared/LegalFooter.tsx @@ -0,0 +1,21 @@ +import Link from "next/link"; + +export default function LegalFooter() { + return ( +
+
+ {process.env.NEXT_PUBLIC_IMPRINT_URL && ( + + Imprint + + )} + {process.env.NEXT_PUBLIC_IMPRINT_URL && process.env.NEXT_PUBLIC_PRIVACY_URL && | } + {process.env.NEXT_PUBLIC_PRIVACY_URL && ( + + Privacy Policy + + )} +
+
+ ); +} diff --git a/turbo.json b/turbo.json index 4c774263fa..770cdf7d74 100644 --- a/turbo.json +++ b/turbo.json @@ -37,6 +37,7 @@ "NEXT_PUBLIC_FORMBRICKS_FEEDBACK_CUSTOM_FORM_ID", "NEXT_PUBLIC_FORMBRICKS_PMF_FORM_ID", "NEXT_PUBLIC_FORMBRICKS_URL", + "NEXT_PUBLIC_IMPRINT_URL", "NODE_ENV", "NEXT_PUBLIC_POSTHOG_API_HOST", "NEXT_PUBLIC_POSTHOG_API_KEY",