Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(ui): add comment on signup re demo account (#565)

Marc Klingene43e89be6750
diff --git a/src/features/auth/components/AuthCloudRegionSwitch.tsx b/src/features/auth/components/AuthCloudRegionSwitch.tsx
index b4df71a1b0..60b8ca9a8b 100644
--- a/src/features/auth/components/AuthCloudRegionSwitch.tsx
+++ b/src/features/auth/components/AuthCloudRegionSwitch.tsx
@@ -16,22 +16,29 @@ const regions = [
},
];
-export function CloudRegionSwitch() {
+export function CloudRegionSwitch({
+ isSignUpPage,
+}: {
+ isSignUpPage?: boolean;
+}) {
const posthog = usePostHog();
if (env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === undefined) return null;
return (
<div>
- <div className="flex w-full items-center justify-between">
+ <div className="flex w-full flex-col justify-between gap-3 md:flex-row md:items-center">
<div>
<span className="text-sm font-medium leading-none">Data Region</span>
<p className="text-xs text-gray-500">
Regions are strictly separated.
</p>
- {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "US" ? (
+ {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined &&
+ isSignUpPage ? (
<p className="text-xs text-gray-500">
- Demo only available in EU region.
+ {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "EU"
+ ? "✅ Demo project available"
+ : "❌ Choose EU for demo project access"}
</p>
) : null}
</div>
diff --git a/src/pages/auth/sign-up.tsx b/src/pages/auth/sign-up.tsx
index 4d373ea4a5..186f51c69d 100644
--- a/src/pages/auth/sign-up.tsx
+++ b/src/pages/auth/sign-up.tsx
@@ -90,15 +90,12 @@ export default function SignIn({ authProviders }: PageProps) {
</div>
{env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined ? (
<div className="text-center sm:mx-auto sm:w-full sm:max-w-[480px]">
- No credit card required.{" "}
- {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "EU"
- ? "All users have access to a demo project."
- : null}
+ No credit card required.
</div>
) : null}
<div className="mt-14 bg-white px-6 py-10 shadow sm:mx-auto sm:w-full sm:max-w-[480px] sm:rounded-lg sm:px-12">
- <CloudRegionSwitch />
+ <CloudRegionSwitch isSignUpPage />
<Form {...form}>
<form
className="space-y-6"