Home page: logged-in users stay on it
CI / test (push) Successful in 2m1s
CI / build (push) Skipped
CI / deploy (push) Skipped

The home page no longer sends logged-in users to their chart: they see it
with the app's header, the buttons lead to their chart, and the login hints
and "without login" texts are left out. The login (and setting a password)
now lands on /keplet by default, which still goes on to the profile when
there is no chart yet.

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-23 10:13:20 +00:00
co-authored by Claude Opus 5.5
parent a986cf4edd
commit 6a147aa253
4 changed files with 32 additions and 29 deletions
+2 -4
View File
@@ -1,5 +1,4 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { JsonLd } from "@/components/PublicFooter";
import { OPERATOR } from "@/lib/legal";
@@ -42,14 +41,13 @@ async function signupMode(): Promise<PublicConfig["signup_mode"]> {
}
}
/** Visitors get the home page; logged-in users go to their chart (or to the profile for their birth data). */
/** The home page, for visitors and logged-in users alike (they get the app's header and a link to their chart). */
export default async function Home() {
const me = await getMe();
if (me) redirect(me.primary_chart_id ? "/keplet" : "/profil");
const base = await siteUrl();
return (
<>
<Landing inviteOnly={(await signupMode()) !== "open"} />
<Landing inviteOnly={(await signupMode()) !== "open"} loggedIn={me !== null} />
<JsonLd
data={{
"@context": "https://schema.org",