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 -1
View File
@@ -22,7 +22,8 @@ export const metadata: Metadata = { title: "Belépés" };
*/
function safeTarget(value: string | string[] | undefined): string {
const v = Array.isArray(value) ? value[0] : value;
return v && /^\/(?![/\\])[^\\\u0000-\u001f]*$/.test(v) ? v : "/";
// By default to the user's chart (or to the profile for their birth data).
return v && /^\/(?![/\\])[^\\\u0000-\u001f]*$/.test(v) ? v : "/keplet";
}
async function loadConfig(): Promise<PublicConfig | null> {