Add freemium variant C: archetype persistence, dashboard banner, lesson gate
- User.archetype/utmSource/utmMedium/utmCampaign fields + migration - register flow reads ?archetype/?utm_* and saves them on the User row - dashboard ArchetypeBanner: per-archetype 'твой путь' block - lesson gate after wow-moment lesson (WOW_MOMENT_LESSON_ID=obs-start-l2-006) → tripwire + full-course offer Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,20 @@ import { redirect } from "next/navigation";
|
||||
import { getSettings } from "@/lib/settings";
|
||||
import { RegisterForm } from "./register-form";
|
||||
|
||||
export default async function RegisterPage() {
|
||||
export default async function RegisterPage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
|
||||
}) {
|
||||
const settings = await getSettings();
|
||||
|
||||
if (settings.registrationEnabled !== "true") {
|
||||
redirect("/login?notice=registration_closed");
|
||||
}
|
||||
|
||||
const sp = await searchParams;
|
||||
const str = (v: string | string[] | undefined) => (Array.isArray(v) ? v[0] : v) ?? "";
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center" style={{ backgroundColor: "var(--background)" }}>
|
||||
<div className="w-full max-w-sm">
|
||||
@@ -26,6 +33,10 @@ export default async function RegisterPage() {
|
||||
privacyPolicyUrl={settings.privacyPolicyUrl}
|
||||
termsUrl={settings.termsUrl}
|
||||
offerUrl={settings.offerUrl}
|
||||
archetype={str(sp.archetype)}
|
||||
utmSource={str(sp.utm_source)}
|
||||
utmMedium={str(sp.utm_medium)}
|
||||
utmCampaign={str(sp.utm_campaign)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user