Home page for visitors
CI / test (push) Successful in 1m16s
CI / build (push) Successful in 7m23s
CI / deploy (push) Skipped

Visitors now get a home page instead of the login: the example chart's
wheel coming alive (planets one by one, aspect lines drawn, a slow orbit,
a quiet starfield), the free short summary, excerpts of the detailed
analysis, the yearly forecast and the relationship comparison, how it works
and a closing call. While sign-up is by invitation it says so: the buttons
lead to the Google login with an invitation, and others can join the
waitlist. Motion is off for reduced-motion users. Logged-in users still go
to their chart.

Also: the wheel tooltips (planets, aspects, angles) were empty, since React
19 wants plain text inside <title>; they are template strings now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-19 10:36:18 +00:00
co-authored by Claude Opus 5.5
parent 4f09aac3f5
commit dad16fe463
5 changed files with 607 additions and 20 deletions
+30 -4
View File
@@ -1,10 +1,36 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { getMe } from "@/lib/server";
import { BACKEND_URL, getMe } from "@/lib/server";
import type { PublicConfig } from "@/lib/types";
// No home page yet: logged-in users go to their chart (or to the profile to enter
// their birth data), others to login.
import { Landing } from "./Landing";
export const metadata: Metadata = {
title: { absolute: "Sorsfonalak – születési képlet, éves előrejelzés, kapcsolati összevetés" },
description:
"Percre pontos születési képlet és személyre szóló elemzés, éves előrejelzés és kapcsolati összevetés: mennyire illetek össze?",
openGraph: {
type: "website",
siteName: "Sorsfonalak",
locale: "hu_HU",
title: "Sorsfonalak – ahol a csillagok összekötnek",
description: "Születési képlet, részletes elemzés, éves előrejelzés és kapcsolati összevetés.",
},
};
async function signupMode(): Promise<PublicConfig["signup_mode"]> {
try {
const res = await fetch(`${BACKEND_URL}/v1/config`, { next: { revalidate: 300 } });
return res.ok ? ((await res.json()) as PublicConfig).signup_mode : "invite";
} catch {
return "invite";
}
}
/** Visitors get the home page; logged-in users go to their chart (or to the profile for their birth data). */
export default async function Home() {
const me = await getMe();
redirect(!me ? "/belepes" : me.primary_chart_id ? "/keplet" : "/profil");
if (me) redirect(me.primary_chart_id ? "/keplet" : "/profil");
return <Landing inviteOnly={(await signupMode()) !== "open"} />;
}