Home page: logged-in users stay on it
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user